Welcome to mirror list, hosted at ThFree Co, Russian Federation.

circuit_breakers.rb « api « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: da756daadcc43becd62b12b897633ea762786363 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# frozen_string_literal: true

module API
  class CircuitBreakers < Grape::API
    before { authenticated_as_admin! }

    resource :circuit_breakers do
      params do
        requires :type,
                 type: String,
                 desc: "The type of circuitbreaker",
                 values: ['repository_storage']
      end
      resource ':type' do
        namespace '', requirements: { type: 'repository_storage' } do
          desc 'Get all git storages' do
            detail 'This feature was introduced in GitLab 9.5'
          end
          get do
            present []
          end

          desc 'Get all failing git storages' do
            detail 'This feature was introduced in GitLab 9.5'
          end
          get 'failing' do
            present []
          end

          desc 'Reset all storage failures and open circuitbreaker' do
            detail 'This feature was introduced in GitLab 9.5'
          end
          delete do
          end
        end
      end
    end
  end
end