Documentation ¶
Index ¶
- Variables
- func EncodeMD(id uint64, clusterName string, rpcAddress string) []byte
- type Gossip
- func (b *Gossip) Call(id uint64, f func(*grpc.ClientConn) error) error
- func (l *Gossip) GetBroadcasts(overhead, limit int) [][]byte
- func (m *Gossip) Join(hosts []string) error
- func (l *Gossip) LocalState(join bool) []byte
- func (self *Gossip) MemberCount() int
- func (m *Gossip) Members() []*api.Member
- func (m *Gossip) MergeRemoteState(buf []byte, join bool)
- func (s *Gossip) NodeMeta(limit int) []byte
- func (b *Gossip) NotifyJoin(n *memberlist.Node)
- func (b *Gossip) NotifyLeave(n *memberlist.Node)
- func (l *Gossip) NotifyMsg(b []byte)
- func (b *Gossip) NotifyUpdate(n *memberlist.Node)
- func (self *Gossip) Shutdown() error
- func (self *Gossip) UpdateMetadata(meta []byte)
- func (mesh *Gossip) WaitForNodes(ctx context.Context, clusterName, nodeName string, expectedNumber int, ...) ([]raft.Peer, error)
- type MemberMetadata
- type MemberlistMemberProvider
- type Peer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrPeerNotFound = errors.New("peer not found") ErrPeerDisabled = errors.New("peer disabled by healthchecks") )
View Source
var (
ErrExistingClusterFound = errors.New("existing cluster found")
)
Functions ¶
Types ¶
type Gossip ¶
type Gossip struct {
// contains filtered or unexported fields
}
func (*Gossip) GetBroadcasts ¶
func (*Gossip) LocalState ¶
func (*Gossip) MemberCount ¶
func (*Gossip) MergeRemoteState ¶
func (*Gossip) NotifyJoin ¶
func (b *Gossip) NotifyJoin(n *memberlist.Node)
NotifyJoin is called if a peer joins the cluster.
func (*Gossip) NotifyLeave ¶
func (b *Gossip) NotifyLeave(n *memberlist.Node)
NotifyLeave is called if a peer leaves the cluster.
func (*Gossip) NotifyUpdate ¶
func (b *Gossip) NotifyUpdate(n *memberlist.Node)
NotifyUpdate is called if a cluster peer gets updated.
func (*Gossip) UpdateMetadata ¶
type MemberMetadata ¶
type MemberMetadata struct { RPCAddress string `json:"raft_address"` ID uint64 `json:"id"` ClusterName string `json:"cluster_id"` }
func DecodeMD ¶
func DecodeMD(buf []byte) (MemberMetadata, error)
type MemberlistMemberProvider ¶
type MemberlistMemberProvider interface {
Members() []api.RaftContext
}
type Peer ¶
type Peer struct { Conn *grpc.ClientConn Enabled bool }
Click to show internal directories.
Click to hide internal directories.