class

RedisServiceManager

Inherits Clustering < Reference < Object

Constants

Log = ::Log.for("redis-service-manager")

Constructors

new(service : String, redis : String, uri : String = "", ttl : Int32 = 20)
Source
new(service : String, redis : Redis::Client, uri : String = "", ttl : Int32 = 20, lock : Mutex = Mutex.new(:reentrant))
Source

Instance methods

cluster_ready?
Source
cluster_size
Source
finalize
Source
generate_version
Source
hash_key
Source
leader?
Source
maintain_registration

Check if node is registered in the cluster either join cluster or maintain registration

Source
node_hash

returns a node_id => URI mapping

Source
node_info
Source
node_key
Source
node_keys
Source
ready?
Source
register

registers this node with the cluster as a member

Source
registered?

is this node registered as part of the cluster

Source
rendezvous

returns the list of known nodes

Source
simulate_crash
Source
simulate_split_brain
Source
ulid

the id of the node

Source
unregister

removes this node from the cluster as a member

Source
uri

the service uri for this host

Source
watching?

is this class watching for changes to the cluster this should return true if registered returns true

Source

Nested types