package
1.12.0
Repository: https://github.com/visualex/swarmkit.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# Functions

DefaultNodeConfig returns the default config for a raft node that can be modified and customized.
DefaultRaftConfig returns a default api.RaftConfig.
NewNode generates a new Raft node.
Register registers the node raft server.
WaitForCluster waits until node observes that the cluster wide config is committed to raft.
WaitForLeader waits until node observe some leader in cluster.

# Constants

IsFollower indicates that the node is a raft follower.
IsLeader indicates that the node is a raft leader.

# Variables

ErrAppendEntry is thrown when the node fail to append an entry to the logs.
ErrApplyNotSpecified is returned during the creation of a raft node when no apply method was provided.
ErrApplySnapshot is returned when the node fails to apply a snapshot.
ErrCannotRemoveMember is thrown when we try to remove a member from the cluster but this would result in a loss of quorum.
ErrConfChangeRefused is returned when there is an issue with the configuration change.
ErrHealthCheckFailure is returned when there is an issue with the initial handshake which means that the address provided must be invalid or there is ongoing connectivity issues at join time.
ErrLostLeadership is returned when an operation was submitted but the node lost leader status before it became committed.
ErrMemberRemoved is thrown when a node was removed from the cluster.
ErrNoClusterLeader is thrown when the cluster has no elected leader.
ErrNoRaftMember is thrown when the node is not yet part of a raft cluster.
ErrRequestTooLarge is returned when a raft internal message is too large to be sent.
ErrSetHardState is returned when the node fails to set the hard state.
ErrStopped is returned when an operation was submitted but the node was stopped in the meantime.

# Structs

NewNodeOptions provides arguments for NewNode.
Node represents the Raft Node useful configuration.

# Type aliases

LeadershipState indicates whether the node is a leader or follower.