diff options
Diffstat (limited to 'lib/gitlab/git/storage.rb')
-rw-r--r-- | lib/gitlab/git/storage.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/gitlab/git/storage.rb b/lib/gitlab/git/storage.rb new file mode 100644 index 00000000000..5933312b0b5 --- /dev/null +++ b/lib/gitlab/git/storage.rb @@ -0,0 +1,25 @@ +module Gitlab + module Git + module Storage + class Inaccessible < StandardError + attr_reader :retry_after + + def initialize(message = nil, retry_after = nil) + super(message) + @retry_after = retry_after + end + end + + CircuitOpen = Class.new(Inaccessible) + Misconfiguration = Class.new(Inaccessible) + Failing = Class.new(Inaccessible) + + REDIS_KEY_PREFIX = 'storage_accessible:'.freeze + REDIS_KNOWN_KEYS = "#{REDIS_KEY_PREFIX}known_keys_set".freeze + + def self.redis + Gitlab::Redis::SharedState + end + end + end +end |