Documentation ¶
Index ¶
- Constants
- type Membership
- func (m *Membership) BindMqttServer(server *mqtt.Server)
- func (m *Membership) Broadcast(msg []byte)
- func (m *Membership) EventChan() <-chan *mb.Event
- func (m *Membership) Join(existing []string) (int, error)
- func (m *Membership) Leave() error
- func (m *Membership) LocalAddr() string
- func (m *Membership) LocalName() string
- func (m *Membership) Members() []mb.Member
- func (m *Membership) SendToNode(nodeName string, msg []byte) error
- func (m *Membership) SendToOthers(msg []byte)
- func (m *Membership) Setup() (err error)
- func (m *Membership) Stat() map[string]int64
- func (m *Membership) Stop()
Constants ¶
View Source
const ( LogLevelDebug = "DEBUG" LogLevelWarn = "WARN" LogLevelError = "ERROR" LogLevelInfo = "INFO" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Membership ¶
type Membership struct {
// contains filtered or unexported fields
}
func (*Membership) BindMqttServer ¶
func (m *Membership) BindMqttServer(server *mqtt.Server)
func (*Membership) Broadcast ¶
func (m *Membership) Broadcast(msg []byte)
func (*Membership) EventChan ¶
func (m *Membership) EventChan() <-chan *mb.Event
func (*Membership) Join ¶ added in v2.3.7
func (m *Membership) Join(existing []string) (int, error)
Join joins an existing Serf cluster. Returns the number of nodes successfully contacted. The returned error will be non-nil only in the case that no nodes could be contacted. The format of an existing node is nodename/ip:port or ip:port
func (*Membership) LocalAddr ¶
func (m *Membership) LocalAddr() string
func (*Membership) LocalName ¶
func (m *Membership) LocalName() string
func (*Membership) Members ¶
func (m *Membership) Members() []mb.Member
func (*Membership) SendToNode ¶
func (m *Membership) SendToNode(nodeName string, msg []byte) error
SendToNode send message to a node
func (*Membership) SendToOthers ¶
func (m *Membership) SendToOthers(msg []byte)
SendToOthers send message to all nodes except yourself
func (*Membership) Setup ¶
func (m *Membership) Setup() (err error)
func (*Membership) Stat ¶
func (m *Membership) Stat() map[string]int64
func (*Membership) Stop ¶
func (m *Membership) Stop()
Click to show internal directories.
Click to hide internal directories.