Class: Dryad::Consul::ServiceObserver

Inherits:
Dryad::Core::Observer
  • Object
show all
Defined in:
lib/dryad/consul/service_observer.rb

Instance Method Summary collapse

Instance Method Details

#update(time, service_instances, exception) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/dryad/consul/service_observer.rb', line 4

def update(time, service_instances, exception)
  if exception
    puts "(#{time}) [#{self.class.to_s}] #{exception.message}"
  elsif service_instances
    update_self(service_instances)
  end
end

#update_self(service_instances) ⇒ Object



12
13
14
# File 'lib/dryad/consul/service_observer.rb', line 12

def update_self(service_instances)
  raise "Implement this method"
end