Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoLeader = errors.New("no leader") ErrNotLeader = errors.New("not a leader") )
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
func NewCluster ¶
func (*Cluster) NewElection ¶
type ClusterRole ¶
type ClusterRole int
const ( RoleCandidate ClusterRole = iota RoleFollower ClusterRole = iota RoleLeader ClusterRole = iota )
type Election ¶
type Election struct {
// contains filtered or unexported fields
}
type RoleInfo ¶
type RoleInfo struct { Address string Role ClusterRole }
Click to show internal directories.
Click to hide internal directories.