Documentation ¶
Index ¶
Constants ¶
View Source
const ( EventJoin = iota EventLeave EventFailed EventUpdate EventReap )
View Source
const ( TagRaftPort = "raft-port" TagGrpcPort = "grpc-port" )
Variables ¶
This section is empty.
Functions ¶
func GenMemberAddrs ¶
func GenNodesFile ¶
Types ¶
type Member ¶
type Member struct { Name string `json:"name"` Addr string `json:"addr"` Port int `json:"port"` Tags map[string]string `json:"tags,omitempty"` }
func ReadMembers ¶
type Node ¶
type Node interface { Setup() error Stop() BindMqttServer(server *mqtt.Server) LocalAddr() string LocalName() string Members() []Member EventChan() <-chan *Event SendToNode(nodeName string, msg []byte) error SendToOthers(msg []byte) Stat() map[string]int64 Join(existing []string) (int, error) Leave() error }
Click to show internal directories.
Click to hide internal directories.