Documentation ¶
Index ¶
- type Table
- func (t *Table) AddToKnownHosts(h *host.Host)
- func (t *Table) GetRandomNodes(count int) []host.Host
- func (t *Table) Inject(nodeKeeper network.NodeKeeper)
- func (t *Table) Rebalance(network.PartitionPolicy)
- func (t *Table) Resolve(ref core.RecordRef) (*host.Host, error)
- func (t *Table) ResolveConsensus(id core.ShortNodeID) (*host.Host, error)
- func (t *Table) ResolveConsensusRef(ref core.RecordRef) (*host.Host, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Table ¶
type Table struct {
NodeKeeper network.NodeKeeper
}
func (*Table) AddToKnownHosts ¶
AddToKnownHosts add host to routing table.
func (*Table) GetRandomNodes ¶
GetRandomNodes get a specified number of random nodes. Returns less if there are not enough nodes in network.
func (*Table) Inject ¶
func (t *Table) Inject(nodeKeeper network.NodeKeeper)
func (*Table) Rebalance ¶
func (t *Table) Rebalance(network.PartitionPolicy)
Rebalance recreate shards of routing table with known hosts according to new partition policy.
func (*Table) ResolveConsensus ¶ added in v0.8.0
Click to show internal directories.
Click to hide internal directories.