class Consul::Async::SerfMember

The ServiceInstance has shortcuts (such as service_address method), but is basically a Hash.

Public Class Methods

new(obj) click to toggle source
# File lib/consul/async/consul_template.rb, line 641
def initialize(obj)
  merge!(obj)
end

Public Instance Methods

serf_statuses() click to toggle source

List the possible Serf statuses as text, indexed by self

# File lib/consul/async/consul_template.rb, line 646
def serf_statuses
  %w[none alive leaving left failed].freeze
end
status() click to toggle source

Return status as text

# File lib/consul/async/consul_template.rb, line 651
def status
  serf_statuses[self['Status']] || "unknownStatus:#{self['Status']}"
end