class Clustering
- Clustering
- Reference
- Object
Defined in:
clustering.crConstant Summary
-
Log =
::Log.for(self)
Constructors
Class Method Summary
Instance Method Summary
-
#cluster_change
Leader publishes a new version upon nodes joining/leaving the cluster
-
#cluster_consistent?
When there's an event under the readiness namespace, node creates a hash from node to version.
-
#cluster_version : String
The version the current node is stable against
-
#consume_stabilization_events
Consume stabilization events until fiber channel empty
-
#discovery : HoundDog::Discovery
Provides cluster node discovery
-
#etcd_client
Generate a new Etcd client
-
#handle_readiness_event
The leader calls the
on_stable
callback if... -
#handle_version_change(value)
Leader has published a new version to etcd
-
#leader? : Bool
Whether node is the cluster leader
-
#leader_node
Attains the current leader node
- #name(*args, **options)
- #name(*args, **options, &)
- #node_versions : Hash(String, String)
- #nodes(*args, **options)
- #nodes(*args, **options, &)
-
#retry_on_missing_lease(&)
Retry a query if a lease is missing for at most the maximum requested lease TTL
- #service(*args, **options)
- #service(*args, **options, &)
-
#stabilize : Array(HoundDog::Service::Node) -> Bool | Nil
Performed to align nodes in the cluster
-
#start
Starts the node's clustering processes.
-
#start(on_stable : String -> Nil | Nil = nil, &stabilize : Array(HoundDog::Service::Node) -> Bool)
Like above.
-
#stop
Unregisters node from the cluster and ceases event handling
- #uri(*args, **options)
- #uri(*args, **options, &)
Constructor Detail
Class Method Detail
Instance Method Detail
When there's an event under the readiness namespace, node creates a hash from node to version. If all the nodes are at the same version, the cluster is consistent.
Consume stabilization events until fiber channel empty
Ensures that the node will have only the latest version
The leader calls the on_stable
callback if...
- cluster's version state is consistent
- consistent state has not already been confirmed to be consistent
Retry a query if a lease is missing for at most the maximum requested lease TTL
Performed to align nodes in the cluster
Starts the node's clustering processes.
- discovery (via hound-dog)
- election_watcher (election event consumer)
- readiness_watcher (cluster node version event consumer)
- version_watcher (version change event consumer)
- consume_stabilization_events (created by version_watcher)
Like above. Accepts a block that will be called with cluster nodes during stabilization events
If stabilize callback is true, the node is marked as ready.