Documentation ¶
Index ¶
- Constants
- type Command
- type Deleg
- func (d *Deleg) AddBucket(name []byte, buck bucketmap.Bucket)
- func (d *Deleg) AddJoinListener(f func(string))
- func (d *Deleg) AddLeaveListener(f func(string))
- func (d *Deleg) DeleteBucket(name []byte)
- func (d *Deleg) GetAll(nodes []string, appndTo []*NodeMetadata) []*NodeMetadata
- func (d *Deleg) GetBroadcasts(overhead, limit int) [][]byte
- func (d *Deleg) GetOne(node string) *NodeMetadata
- func (d *Deleg) Init()
- func (d *Deleg) IssueHealth(h healthmap.Health)
- func (*Deleg) LocalState(join bool) []byte
- func (*Deleg) MergeRemoteState(buf []byte, join bool)
- func (d *Deleg) NodeMeta(limit int) []byte
- func (d *Deleg) NotifyAlive(peer *memberlist.Node) error
- func (d *Deleg) NotifyJoin(n *memberlist.Node)
- func (d *Deleg) NotifyLeave(n *memberlist.Node)
- func (d *Deleg) NotifyMerge(peers []*memberlist.Node) error
- func (d *Deleg) NotifyMsg(msg []byte)
- func (d *Deleg) NotifyUpdate(n *memberlist.Node)
- func (d *Deleg) OfferNetKvStore(n *NetKvStore)
- func (d *Deleg) SortNodesDistance(s []*NodeMetadata)
- type DistanceMeter
- type HealthEvent
- type Metadata
- type NetKvStore
- type NodeMetadata
Constants ¶
View Source
const ( // &Command{} CmdAdd uint = iota CmdSub // &NetKvStore{} NetAdd NetRem // &HealthEvent{} PutHealth )
View Source
const Magic uint = 0xcafedead
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
func (*Command) Invalidates ¶
func (c *Command) Invalidates(b memberlist.Broadcast) bool
type Deleg ¶
type Deleg struct { Self string Meta *Metadata TLQ memberlist.TransmitLimitedQueue ML *memberlist.Memberlist NM globmap.NodeMap BM bucketmap.BucketMap HM healthmap.HealthMap NKV netkv.NetKVMap Dist DistanceMeter // contains filtered or unexported fields }
func (*Deleg) AddJoinListener ¶
func (*Deleg) AddLeaveListener ¶
func (*Deleg) DeleteBucket ¶
After calling, the 'name' array must no be modified.
func (*Deleg) GetAll ¶
func (d *Deleg) GetAll(nodes []string, appndTo []*NodeMetadata) []*NodeMetadata
----
func (*Deleg) GetBroadcasts ¶
func (*Deleg) GetOne ¶
func (d *Deleg) GetOne(node string) *NodeMetadata
func (*Deleg) LocalState ¶
func (*Deleg) MergeRemoteState ¶
func (*Deleg) NotifyAlive ¶
func (d *Deleg) NotifyAlive(peer *memberlist.Node) error
func (*Deleg) NotifyJoin ¶
func (d *Deleg) NotifyJoin(n *memberlist.Node)
func (*Deleg) NotifyLeave ¶
func (d *Deleg) NotifyLeave(n *memberlist.Node)
func (*Deleg) NotifyMerge ¶
func (d *Deleg) NotifyMerge(peers []*memberlist.Node) error
func (*Deleg) NotifyUpdate ¶
func (d *Deleg) NotifyUpdate(n *memberlist.Node)
func (*Deleg) OfferNetKvStore ¶
func (d *Deleg) OfferNetKvStore(n *NetKvStore)
After calling, the *NetKvStore data structure and all buffers used by it must not be used.
func (*Deleg) SortNodesDistance ¶
func (d *Deleg) SortNodesDistance(s []*NodeMetadata)
type DistanceMeter ¶
type HealthEvent ¶
func (HealthEvent) Finished ¶
func (c HealthEvent) Finished()
func (HealthEvent) Invalidates ¶
func (c HealthEvent) Invalidates(b memberlist.Broadcast) bool
func (HealthEvent) Message ¶
func (c HealthEvent) Message() []byte
type NetKvStore ¶
func (*NetKvStore) Finished ¶
func (c *NetKvStore) Finished()
func (*NetKvStore) Invalidates ¶
func (c *NetKvStore) Invalidates(b memberlist.Broadcast) bool
func (*NetKvStore) Message ¶
func (c *NetKvStore) Message() []byte
type NodeMetadata ¶
type NodeMetadata struct { Name string IP net.IP Metadata // contains filtered or unexported fields }
func (*NodeMetadata) String ¶
func (m *NodeMetadata) String() string
Click to show internal directories.
Click to hide internal directories.