gossiper

package
v0.0.0-...-ac41614 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2022 License: MIT Imports: 0 Imported by: 0

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL