Documentation ¶
Index ¶
- type Cluster
- type NodeSubscriber
- func (e *NodeSubscriber) OnJoin(addr string)
- func (e *NodeSubscriber) OnLeave(addr string)
- func (e *NodeSubscriber) OnUpdate(addr string, key string, value string)
- func (s *NodeSubscriber) WaitPeerJoinedWithTimeout(t time.Duration) (string, bool)
- func (s *NodeSubscriber) WaitPeerLeftWithTimeout(t time.Duration) (string, bool)
- func (s *NodeSubscriber) WaitPeerUpdatedWithTimeout(t time.Duration) (peerUpdate, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
func NewCluster ¶
func NewCluster() *Cluster
func (*Cluster) AddNode ¶
func (c *Cluster) AddNode(nodeSub *NodeSubscriber) (*scuttlebutt.Scuttlebutt, error)
func (*Cluster) RemoveNode ¶
type NodeSubscriber ¶
type NodeSubscriber struct { PeerJoinedCh chan string PeerLeftCh chan string PeerUpdatedCh chan peerUpdate }
func NewNodeSubscriber ¶
func NewNodeSubscriber() *NodeSubscriber
func (*NodeSubscriber) OnJoin ¶
func (e *NodeSubscriber) OnJoin(addr string)
func (*NodeSubscriber) OnLeave ¶
func (e *NodeSubscriber) OnLeave(addr string)
func (*NodeSubscriber) OnUpdate ¶
func (e *NodeSubscriber) OnUpdate(addr string, key string, value string)
func (*NodeSubscriber) WaitPeerJoinedWithTimeout ¶
func (s *NodeSubscriber) WaitPeerJoinedWithTimeout(t time.Duration) (string, bool)
func (*NodeSubscriber) WaitPeerLeftWithTimeout ¶
func (s *NodeSubscriber) WaitPeerLeftWithTimeout(t time.Duration) (string, bool)
func (*NodeSubscriber) WaitPeerUpdatedWithTimeout ¶
func (s *NodeSubscriber) WaitPeerUpdatedWithTimeout(t time.Duration) (peerUpdate, bool)
Click to show internal directories.
Click to hide internal directories.