Versions in this module Expand all Collapse all v0 v0.1.0 Jul 16, 2020 Changes in this version + func ParseCSVAddrs(csv string, port uint16) ([]string, error) + func UniqTCPAddr(one string, all []string) (*net.TCPAddr, []*net.TCPAddr, error) + type Delegate interface + GossipStarted func(*Sender) + Metadata func(limit int) []byte + NotifyJoin func(*Node) + NotifyLeave func(*Node) + NotifyMessage func(msg []byte) + NotifyPing func(other *Node, payload []byte) + NotifyUpdate func(*Node) + PingPayload func() []byte + type Node struct + Addr net.IP + Meta []byte + Name string + Port uint16 + RTT time.Duration + func (n *Node) Address() string + func (n *Node) String() string + type Sender struct + func (s *Sender) Broadcast(msg []byte) + func (s *Sender) Name() string + func (s *Sender) Peer(name string) *Node + func (s *Sender) Peers() []*Node + func (s *Sender) Ping(name string) (time.Duration, error) + func (s *Sender) Self() *Node + func (s *Sender) SendBestEffort(name string, msg []byte) + func (s *Sender) SendReliable(name string, msg []byte) + func (s *Sender) UpdateMetadata(timeout time.Duration) error + type Server struct + Config *memberlist.Config + func NewServer(name, key string) *Server + func (s *Server) Peer(name string) *Node + func (s *Server) Peers() []*Node + func (s *Server) RegisterDelegate(d Delegate) error + func (s *Server) Serve(ctx context.Context, bindstr string, bootstrapsstr ...string) error + func (s *Server) Shutdown(ctx context.Context) error