Documentation ¶
Index ¶
- type GossipNodeSet
- func (g *GossipNodeSet) GetBroadcasts(overhead, limit int) [][]byte
- func (g *GossipNodeSet) LocalState(join bool) []byte
- func (g *GossipNodeSet) MergeRemoteState(buf []byte, join bool)
- func (g *GossipNodeSet) NodeMeta(limit int) []byte
- func (g *GossipNodeSet) Nodes() []*pilosa.Node
- func (g *GossipNodeSet) NotifyMsg(b []byte)
- func (g *GossipNodeSet) Open() error
- func (g *GossipNodeSet) SendAsync(pb proto.Message) error
- func (g *GossipNodeSet) SendSync(pb proto.Message) error
- func (g *GossipNodeSet) Start(h pilosa.BroadcastHandler) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GossipNodeSet ¶
type GossipNodeSet struct { // The writer for any logging. LogOutput io.Writer // contains filtered or unexported fields }
GossipNodeSet represents a gossip implementation of NodeSet using memberlist GossipNodeSet also represents a gossip implementation of pilosa.Broadcaster GossipNodeSet also represents an implementation of memberlist.Delegate
func NewGossipNodeSet ¶
func NewGossipNodeSet(name string, gossipHost string, gossipPort int, gossipSeed string, sh pilosa.StatusHandler) *GossipNodeSet
NewGossipNodeSet returns a new instance of GossipNodeSet.
func (*GossipNodeSet) GetBroadcasts ¶
func (g *GossipNodeSet) GetBroadcasts(overhead, limit int) [][]byte
GetBroadcasts implementation of the memberlist.Delegate interface called when user data messages can be broadcast.
func (*GossipNodeSet) LocalState ¶
func (g *GossipNodeSet) LocalState(join bool) []byte
LocalState implementation of the memberlist.Delegate interface sends this Node's state data.
func (*GossipNodeSet) MergeRemoteState ¶
func (g *GossipNodeSet) MergeRemoteState(buf []byte, join bool)
MergeRemoteState implementation of the memberlist.Delegate interface receive and process the remote side side's LocalState.
func (*GossipNodeSet) NodeMeta ¶
func (g *GossipNodeSet) NodeMeta(limit int) []byte
NodeMeta implementation of the memberlist.Delegate interface.
func (*GossipNodeSet) Nodes ¶
func (g *GossipNodeSet) Nodes() []*pilosa.Node
Nodes implements the NodeSet interface and returns a list of nodes in the cluster.
func (*GossipNodeSet) NotifyMsg ¶
func (g *GossipNodeSet) NotifyMsg(b []byte)
NotifyMsg implementation of the memberlist.Delegate interface called when a user-data message is received.
func (*GossipNodeSet) Open ¶
func (g *GossipNodeSet) Open() error
Open implements the NodeSet interface to start network activity.
func (*GossipNodeSet) SendAsync ¶
func (g *GossipNodeSet) SendAsync(pb proto.Message) error
SendAsync implementation of the Broadcaster interface.
func (*GossipNodeSet) SendSync ¶
func (g *GossipNodeSet) SendSync(pb proto.Message) error
SendSync implementation of the Broadcaster interface.
func (*GossipNodeSet) Start ¶
func (g *GossipNodeSet) Start(h pilosa.BroadcastHandler) error
Start implements the BroadcastReceiver interface and sets the BroadcastHandler