Class: ConsulStockpile::DetectCanary

Inherits:
Base
  • Object
show all
Defined in:
lib/consul_stockpile/detect_canary.rb

Constant Summary collapse

KEY =
'stockpile/canary'.freeze

Instance Method Summary collapse

Methods inherited from Base

call

Instance Method Details

#callObject



7
8
9
10
11
12
# File 'lib/consul_stockpile/detect_canary.rb', line 7

def call
  canary = Diplomat::Kv.get(KEY, {}, :return)
  OpenStruct.new(
    exists: canary != ""
  )
end