Versions in this module Expand all Collapse all v0 v0.6.0 May 25, 2016 v0.5.0 Feb 5, 2016 Changes in this version + const MetaMaxSize + const ProtocolVersion2Compatible + const ProtocolVersionMax + const ProtocolVersionMin + func LogAddress(addr net.Addr) string + func LogConn(conn net.Conn) string + type AliveDelegate interface + NotifyAlive func(peer *Node) error + type Broadcast interface + Finished func() + Invalidates func(b Broadcast) bool + Message func() []byte + type ChannelEventDelegate struct + Ch chan<- NodeEvent + func (c *ChannelEventDelegate) NotifyJoin(n *Node) + func (c *ChannelEventDelegate) NotifyLeave(n *Node) + func (c *ChannelEventDelegate) NotifyUpdate(n *Node) + type Config struct + AdvertiseAddr string + AdvertisePort int + Alive AliveDelegate + BindAddr string + BindPort int + Conflict ConflictDelegate + Delegate Delegate + DelegateProtocolMax uint8 + DelegateProtocolMin uint8 + DelegateProtocolVersion uint8 + DisableTcpPings bool + EnableCompression bool + Events EventDelegate + GossipInterval time.Duration + GossipNodes int + IndirectChecks int + Keyring *Keyring + LogOutput io.Writer + Logger *log.Logger + Merge MergeDelegate + Name string + Ping PingDelegate + ProbeInterval time.Duration + ProbeTimeout time.Duration + ProtocolVersion uint8 + PushPullInterval time.Duration + RetransmitMult int + SecretKey []byte + SuspicionMult int + TCPTimeout time.Duration + func DefaultLANConfig() *Config + func DefaultLocalConfig() *Config + func DefaultWANConfig() *Config + func (c *Config) EncryptionEnabled() bool + type ConflictDelegate interface + NotifyConflict func(existing, other *Node) + type Delegate interface + GetBroadcasts func(overhead, limit int) [][]byte + LocalState func(join bool) []byte + MergeRemoteState func(buf []byte, join bool) + NodeMeta func(limit int) []byte + NotifyMsg func([]byte) + type EventDelegate interface + NotifyJoin func(*Node) + NotifyLeave func(*Node) + NotifyUpdate func(*Node) + type Keyring struct + func NewKeyring(keys [][]byte, primaryKey []byte) (*Keyring, error) + func (k *Keyring) AddKey(key []byte) error + func (k *Keyring) GetKeys() [][]byte + func (k *Keyring) GetPrimaryKey() (key []byte) + func (k *Keyring) RemoveKey(key []byte) error + func (k *Keyring) UseKey(key []byte) error + type Memberlist struct + func Create(conf *Config) (*Memberlist, error) + func (m *Memberlist) Join(existing []string) (int, error) + func (m *Memberlist) Leave(timeout time.Duration) error + func (m *Memberlist) LocalNode() *Node + func (m *Memberlist) Members() []*Node + func (m *Memberlist) NumMembers() (alive int) + func (m *Memberlist) Ping(node string, addr net.Addr) (time.Duration, error) + func (m *Memberlist) ProtocolVersion() uint8 + func (m *Memberlist) SendTo(to net.Addr, msg []byte) error + func (m *Memberlist) SendToTCP(to *Node, msg []byte) error + func (m *Memberlist) SendToUDP(to *Node, msg []byte) error + func (m *Memberlist) Shutdown() error + func (m *Memberlist) UpdateNode(timeout time.Duration) error + type MergeDelegate interface + NotifyMerge func(peers []*Node) error + type NoPingResponseError struct + func (f NoPingResponseError) Error() string + type Node struct + Addr net.IP + DCur uint8 + DMax uint8 + DMin uint8 + Meta []byte + Name string + PCur uint8 + PMax uint8 + PMin uint8 + Port uint16 + type NodeEvent struct + Event NodeEventType + Node *Node + type NodeEventType int + const NodeJoin + const NodeLeave + const NodeUpdate + type PingDelegate interface + AckPayload func() []byte + NotifyPingComplete func(other *Node, rtt time.Duration, payload []byte) + type TransmitLimitedQueue struct + NumNodes func() int + RetransmitMult int + func (q *TransmitLimitedQueue) GetBroadcasts(overhead, limit int) [][]byte + func (q *TransmitLimitedQueue) NumQueued() int + func (q *TransmitLimitedQueue) Prune(maxRetain int) + func (q *TransmitLimitedQueue) QueueBroadcast(b Broadcast) + func (q *TransmitLimitedQueue) Reset()