Documentation ¶
Overview ¶
Package addressbook provides persisted mapping between overlay (topology) address and bzz.Address address, which contains underlay (physical) address. The underlay address contains both physical and p2p addresses.
It is single point of truth about known peers and relations of their overlay and underlay addresses.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("addressbook: not found")
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface { GetPutter Remover // Overlays returns a list of all overlay addresses saved in addressbook. Overlays() ([]swarm.Address, error) // IterateOverlays exposes overlays in a form of an iterator. IterateOverlays(func(swarm.Address) (bool, error)) error // Addresses returns a list of all bzz.Address-es saved in addressbook. Addresses() ([]bzz.Address, error) }
Interface is the AddressBook interface.
func New ¶
func New(storer storage.StateStorer) Interface
New creates new addressbook for state storer.
Click to show internal directories.
Click to hide internal directories.