class HoundDog::Discovery
- HoundDog::Discovery
- Reference
- Object
Defined in:
hound-dog/discovery.crConstant Summary
-
Log =
::Log.for(self)
Constructors
Class Method Summary
-
.from_hash_value(hash_node : String) : Service::Node
Convert a
rendezvous-hash
formatted value to aService::Node
-
.to_hash_value(node : Service::Node)
Convert a
Service::Node
to arendezvous-hash
formatted value
Instance Method Summary
- #[](key)
- #[]?(key)
-
#etcd(*args, **options)
Service methods
-
#etcd(*args, **options, &)
Service methods
- #finalize
-
#find(key : String) : Service::Node
Consistent hash lookup
-
#find?(key : String) : Service::Node | Nil
Consistent hash lookup
-
#lease_id(*args, **options)
Service getters
-
#lease_id(*args, **options, &)
Service getters
-
#name(*args, **options)
Service getters
-
#name(*args, **options, &)
Service getters
-
#node(*args, **options)
Service getters
-
#node(*args, **options, &)
Service getters
-
#node_hash : Hash(String, URI)
Construct a mapping of node names their URIs
-
#nodes : Array(Service::Node)
Nodes from the
rendezvous-hash
-
#own_node?(key : String) : Bool
Determine if key maps to current node
-
#register(*args, **options)
Service methods
-
#register(®ister_callback : Array(Service::Node) -> ) : Nil
Register service
-
#register(*args, **options, &)
Service methods
-
#registered?(*args, **options)
Service methods
-
#registered?(*args, **options, &)
Service methods
-
#registration_channel(*args, **options)
Service methods
-
#registration_channel(*args, **options, &)
Service methods
- #rendezvous : RendezvousHash
-
#service(*args, **options)
Service getters
-
#service(*args, **options, &)
Service getters
-
#unmonitor(*args, **options)
Service methods
-
#unmonitor(*args, **options, &)
Service methods
-
#unregister : Nil
Unregister service
-
#uri(*args, **options)
Service getters
-
#uri(*args, **options, &)
Service getters
Constructor Detail
def self.new(service : String, name : String = ULID.generate, uri : URI | String = URI.new(host: "127.0.0.1", port: 8080, scheme: "http"), watchfeed : Bool = true, on_change : Callback | Nil = nil)
#
Class Method Detail
def self.from_hash_value(hash_node : String) : Service::Node
#
Convert a rendezvous-hash
formatted value to a Service::Node
def self.to_hash_value(node : Service::Node)
#
Convert a Service::Node
to a rendezvous-hash
formatted value