Documentation ¶
Index ¶
Constants ¶
View Source
const ( RetainSnapshotCount = 2 RaftTimeout = 10 * time.Second )
View Source
const (
LeadershipPollInterval = time.Duration(500 * time.Millisecond)
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { Host string `json:"host,omitempty" yaml:"host,omitempty"` Port int `json:"port,omitempty" yaml:"port,omitempty"` }
func (*Address) UnmarshalFlag ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
func (*Cluster) MonitorClusterEvents ¶
func (*Cluster) StartRPCServer ¶
func (*Cluster) StopRPCServer ¶
func (c *Cluster) StopRPCServer()
type Option ¶
type Option func(*Cluster)
Option is the type for functional options.
func WithBootstrap ¶
func WithDirectory ¶
WithDirectory specifies the directory where the Raft cluster state is stored.
func WithNetAddress ¶
WithNetAddress specifies the address used in multiplexing mode both for intra-cluster communications and to expose the gRPC services.
Click to show internal directories.
Click to hide internal directories.