Class: DeadmanCheck::KeySet

Inherits:
Object
  • Object
show all
Defined in:
lib/deadman_check_keyset.rb

Overview

KeySet Class

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(host, port, key, frequency) ⇒ KeySet

Returns a new instance of KeySet.



11
12
13
14
15
16
# File 'lib/deadman_check_keyset.rb', line 11

def initialize(host, port, key, frequency)
  @host = host
  @port = port
  @key  = key
  @frequency = frequency
end

Instance Attribute Details

#frequencyObject

Returns the value of attribute frequency.



9
10
11
# File 'lib/deadman_check_keyset.rb', line 9

def frequency
  @frequency
end

#hostObject

Returns the value of attribute host.



9
10
11
# File 'lib/deadman_check_keyset.rb', line 9

def host
  @host
end

#keyObject

Returns the value of attribute key.



9
10
11
# File 'lib/deadman_check_keyset.rb', line 9

def key
  @key
end

#portObject

Returns the value of attribute port.



9
10
11
# File 'lib/deadman_check_keyset.rb', line 9

def port
  @port
end

Instance Method Details

#run_consul_key_updateObject



18
19
20
# File 'lib/deadman_check_keyset.rb', line 18

def run_consul_key_update
  update_consul_key(@host, @port, @key, @frequency)
end