gossip

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 8, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

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

Start implements the BroadcastReceiver interface and sets the BroadcastHandler

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL