Documentation ¶
Index ¶
- type PSlice
- func (s *PSlice) Add(addrs ...swarm.Address)
- func (s *PSlice) BinPeers(bin uint8) []swarm.Address
- func (s *PSlice) BinSize(bin uint8) int
- func (s *PSlice) EachBin(pf topology.EachPeerFunc) error
- func (s *PSlice) EachBinRev(pf topology.EachPeerFunc) error
- func (s *PSlice) Exists(addr swarm.Address) bool
- func (s *PSlice) Length() int
- func (s *PSlice) Remove(addr swarm.Address)
- func (s *PSlice) ShallowestEmpty() (uint8, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PSlice ¶
PSlice maintains a list of addresses, indexing them by their different proximity orders.
func (*PSlice) EachBin ¶
func (s *PSlice) EachBin(pf topology.EachPeerFunc) error
iterates over all peers from deepest bin to shallowest.
func (*PSlice) EachBinRev ¶
func (s *PSlice) EachBinRev(pf topology.EachPeerFunc) error
EachBinRev iterates over all peers from shallowest bin to deepest.
func (*PSlice) ShallowestEmpty ¶
ShallowestEmpty returns the shallowest empty bin if one exists. If such bin does not exists, returns true as bool value.
Click to show internal directories.
Click to hide internal directories.