Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterConfiguration ¶
type ClusterConfiguration interface { AddNode() RemoveNode() ReplaceNode() }
type ClusterConfigurationListener ¶
type ClusterConfigurationListener interface { // Invoked after the node has joined the cluster OnJoined(func()) // Invoked after the node has left or been forcibly removed from the cluster OnLeft(func()) OnGainPartitionReplica(func(partition, replica uint64)) OnLostPartitionReplica(func(partition, replica uint64)) OnGainedPartitionReplicaOwnership(func(partition, replica uint64)) OnLostPartitionReplicaOwnership(func(partition, replica uint64)) OnSiteAdded(func(siteID string)) OnSiteRemoved(func(siteID string)) OnRelayAdded(func(relayID string)) OnRelayRemoved(func(relayID string)) OnRelayMoved(func(relayID string, siteID string)) }
type ClusterState ¶
type ClusterState interface { // Get the NodeState associated with this node Get(nodeID uint64) NodeState // Add a new node state for this node Add(nodeID uint64) Digest() map[uint64]NodeStateVersion }
type NodeState ¶
type NodeState interface { Tick() Heartbeat() NodeStateVersion Get(key string) NodeStateEntry Put(key string, value string) Version() NodeStateVersion LatestEntries(minVersion NodeStateVersion) []NodeStateEntry }
type NodeStateEntry ¶
type NodeStateEntry interface { Key() string Value() string Version() NodeStateVersion }
type NodeStateVersion ¶
type NodeStateVersion interface {
Version() uint64
}
Click to show internal directories.
Click to hide internal directories.