2018-09-29 18:34:47 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-05-17 12:17:15 -04:00
|
|
|
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
|
2018-01-15 06:03:39 -05:00
|
|
|
desc 'Get all git storages' do
|
2017-05-17 12:17:15 -04:00
|
|
|
detail 'This feature was introduced in GitLab 9.5'
|
|
|
|
end
|
|
|
|
get do
|
2018-10-09 01:59:42 -04:00
|
|
|
present []
|
2017-05-17 12:17:15 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
desc 'Get all failing git storages' do
|
|
|
|
detail 'This feature was introduced in GitLab 9.5'
|
|
|
|
end
|
|
|
|
get 'failing' do
|
2018-10-09 01:59:42 -04:00
|
|
|
present []
|
2017-05-17 12:17:15 -04:00
|
|
|
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
|