abstract class Clustering

Direct Known Subclasses

Defined in:

redis_service_manager/clustering.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(service : String) #

[View source]

Instance Method Detail

def cluster_stable_callbacks : Array( -> ) #

[View source]
abstract def node_hash : Hash(String, URI) #

returns a node_id => URI mapping


[View source]
def on_cluster_stable(&callback : -> ) #

Called on leader node when the cluster has stabilised


[View source]
def on_rebalance(&callback : RendezvousHash, RebalanceComplete -> ) #

Called when the cluster has changed


[View source]
def rebalance_callbacks : Array(RendezvousHash, RebalanceComplete -> ) #

[View source]
abstract def register : Bool #

registers this node with the cluster as a member


[View source]
abstract def registered? : Bool #

is this node registered as part of the cluster


[View source]
abstract def rendezvous : RendezvousHash #

returns the list of known nodes


[View source]
def service : String #

the name of the service you are clustering


[View source]
abstract def ulid : String #

the id of the node


[View source]
abstract def unregister : Bool #

removes this node from the cluster as a member


[View source]
abstract def uri : String #

the service uri for this host


[View source]
def version : String #

[View source]
abstract def watching? : Bool #

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


[View source]