debian-mirror-gitlab/lib/api/circuit_breakers.rb

40 lines
1,017 B
Ruby
Raw Normal View History

2018-12-05 23:21:45 +05:30
# frozen_string_literal: true
2017-09-10 17:25:29 +05:30
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-03-17 18:26:18 +05:30
desc 'Get all git storages' do
2017-09-10 17:25:29 +05:30
detail 'This feature was introduced in GitLab 9.5'
end
get do
2018-12-13 13:39:08 +05:30
present []
2017-09-10 17:25:29 +05:30
end
desc 'Get all failing git storages' do
detail 'This feature was introduced in GitLab 9.5'
end
get 'failing' do
2018-12-13 13:39:08 +05:30
present []
2017-09-10 17:25:29 +05:30
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