Versions in this module Expand all Collapse all v0 v0.1.0 Nov 3, 2020 Changes in this version + type CandidateJoinAccumulator struct + type ClusterBootstrapService struct + TransportService *transport.Service + func NewClusterBootstrapService(service *transport.Service) *ClusterBootstrapService + type Coordinator struct + ApplierState *state.ClusterState + ClusterApplierService *cluster.ApplierService + ClusterBootstrapService *ClusterBootstrapService + CoordinationState state.CoordinationState + Done func() + JoinHelper *JoinHelper + MasterService *cluster.MasterService + PeerFinder *CoordinatorPeerFinder + PersistedState state.PersistedState + PreVoteCollector *PreVoteCollector + Started bool + TransportService *transport.Service + func NewCoordinator(transportService *transport.Service, ...) *Coordinator + func (c *Coordinator) Publish(event state.ClusterChangedEvent) + func (c *Coordinator) Start() + func (c *Coordinator) StartInitialJoin() + type CoordinatorPeerFinder struct + Coordinator *Coordinator + LastAcceptedNodes *state.Nodes + PeersByAddress map[string]*state.Node + func NewCoordinatorPeerFinder(coordinator *Coordinator) *CoordinatorPeerFinder + type FollowersChecker struct + type InitialJoinAccumulator struct + type JoinAccumulator interface + type JoinHelper struct + func NewJoinHelper(transportService *transport.Service, ...) *JoinHelper + func (h *JoinHelper) SendJoinRequest(destination state.Node, term int64, join *state.Join) + func (h *JoinHelper) SendStartJoinRequest(startJoinRequest StartJoinRequest, destination state.Node) + type JoinRequest struct + Join state.Join + MinimumTerm int64 + SourceNode state.Node + func JoinRequestFromBytes(b []byte) *JoinRequest + func (r *JoinRequest) GetTerm() int64 + func (r *JoinRequest) ToBytes() []byte + type LeaderChecker struct + type Mode int + const CANDIDATE + const FOLLOWER + const INIT + const LEADER + const PREVOTING + type Module struct + type PeersRequest struct + KnownPeers []state.Node + SourceNode state.Node + func PeersRequestFromBytes(b []byte) *PeersRequest + func (r *PeersRequest) ToBytes() []byte + type PeersResponse struct + KnownPeers []state.Node + MasterNode state.Node + Term int64 + func PeersResponseFromBytes(b []byte) *PeersResponse + func (r *PeersResponse) ToBytes() []byte + type PreVoteCollector struct + Lock sync.RWMutex + func NewPreVoteCollector(transportService *transport.Service, startElection func(), ...) *PreVoteCollector + func (p *PreVoteCollector) SetVote(key state.Node, value *PreVoteResponse) + func (p *PreVoteCollector) Start() + type PreVoteRequest struct + SourceNode state.Node + Term int64 + func NewPreVoteRequest(sourceNode state.Node, term int64) *PreVoteRequest + func PreVoteRequestFromBytes(b []byte) *PreVoteRequest + func (p *PreVoteRequest) ToBytes() []byte + type PreVoteResponse struct + CurrentTerm int64 + Err string + func NewPreVoteResponse(currentTerm int64) *PreVoteResponse + func PreVoteResponseFromBytes(b []byte) *PreVoteResponse + func (p *PreVoteResponse) ToBytes() []byte + type StartJoinRequest struct + SourceNode state.Node + Term int64 + func StartJoinRequestFromBytes(b []byte) *StartJoinRequest + func (r *StartJoinRequest) ToBytes() []byte