Documentation
¶
Index ¶
- type Cluster
- func (c *Cluster) Addr() string
- func (c *Cluster) Join(addr ...string) (int, error)
- func (c *Cluster) Members() []cluster.Member
- func (c *Cluster) RaftApply(cmd []byte) raft.ApplyFuture
- func (c *Cluster) RaftEnabled() bool
- func (c *Cluster) RaftLeaderID() string
- func (c *Cluster) RaftMembers(replicaSet uint64) []cluster.Member
- func (c *Cluster) RaftState() raft.RaftState
- func (c *Cluster) ReplicaSet() uint64
- func (c *Cluster) SetGatewayAddrs(hostPorts []string) error
- func (c *Cluster) SetTunnelAddrs(hostPorts []string) error
- func (c *Cluster) Shutdown()
- func (c *Cluster) Start()
- func (c *Cluster) TotalReplicas() int
- type Config
- type Member
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct {
cluster.ReplicaMessageHandler
// contains filtered or unexported fields
}
Cluster
func (*Cluster) RaftEnabled ¶ added in v0.2.0
func (*Cluster) RaftLeaderID ¶
func (*Cluster) ReplicaSet ¶
func (*Cluster) SetGatewayAddrs ¶
func (*Cluster) SetTunnelAddrs ¶ added in v0.1.9
func (*Cluster) TotalReplicas ¶ added in v0.2.10
type Config ¶
type Config struct {
ServerID []byte
Bootstrap bool
RaftPort int
ReplicaSet uint64
Mode cluster.Mode
GossipPort int
DataPath string
}
Config
type Member ¶
type Member struct {
ShardRange [2]uint32
ClusterAddr net.IP
ClusterPort uint16
// contains filtered or unexported fields
}
Member
func (*Member) GatewayAddr ¶
func (*Member) ReplicaSet ¶
func (*Member) TunnelAddr ¶ added in v0.1.9
Click to show internal directories.
Click to hide internal directories.