Sha256: 2670906130333886381a5c9293e0c1e993318d8e160577ea43a9aeaa3b917464

Contents?: true

Size: 427 Bytes

Versions: 3

Compression:

Stored size: 427 Bytes

Contents

module Dryad
  module Consul
    class ServiceObserver < ::Dryad::Core::Observer
      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

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dryad-consul-1.1.0 lib/dryad/consul/service_observer.rb
dryad-consul-1.0.1 lib/dryad/consul/service_observer.rb
dryad-consul-1.0.0 lib/dryad/consul/service_observer.rb