Documentation ¶ Index ¶ type Cluster type Member type Mode type Raft type ReplicaMessageHandler Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Cluster ¶ type Cluster interface { Raft Start() Members() []Member Join(addr ...string) (int, error) Shutdown() ReplicaSet() uint64 TotalReplicas() int Addr() string SetGatewayAddrs(hostPorts []string) error SetTunnelAddrs(hostPorts []string) error } type Member ¶ type Member interface { Proto(info *rony.Edge) *rony.Edge ServerID() string RaftState() rony.RaftState ReplicaSet() uint64 GatewayAddr() []string TunnelAddr() []string TunnelConn() (net.Conn, error) RaftPort() int } type Mode ¶ type Mode string const ( // SingleReplica if set then each replica set is only one node. i.e. raft is OFF. SingleReplica Mode = "singleReplica" // MultiReplica if set then each replica set is a raft cluster MultiReplica Mode = "multiReplica" ) type Raft ¶ type Raft interface { RaftEnabled() bool RaftMembers(replicaSet uint64) []Member RaftState() raft.RaftState RaftApply(cmd []byte) raft.ApplyFuture RaftLeaderID() string } type ReplicaMessageHandler ¶ type ReplicaMessageHandler func(raftCmd *rony.RaftCommand) error Source Files ¶ View all Source files cluster.go Directories ¶ Show internal Expand all Path Synopsis gossip store Click to show internal directories. Click to hide internal directories.