Documentation ¶
Index ¶
- Constants
- func NewAddrBook(parent goprocess.Process, s storage.Table, bus eventbus.Bus, cacheSize int) peerstore.AddrBook
- func NewDefaultAddrBook(proc goprocess.Process, s storage.Storage, bus eventbus.Bus) (peerstore.AddrBook, error)
- func NewDefaultPeerstoreWithAddrBook(proc goprocess.Process, s storage.Storage, ab peerstore.AddrBook) (peerstore.Peerstore, error)
- func NewKeyBook(_ goprocess.Process, store storage.Table) (peerstore.KeyBook, error)
- func NewPeerMetadata(_ goprocess.Process, store storage.Table) (peerstore.PeerMetadata, error)
- type NodeInfo
Constants ¶
View Source
const DefaultTableName = "peer"
DefaultTableName is the default table name for peer storage
Variables ¶
This section is empty.
Functions ¶
func NewAddrBook ¶
func NewAddrBook(parent goprocess.Process, s storage.Table, bus eventbus.Bus, cacheSize int) peerstore.AddrBook
NewAddrBook creates a new instance of AddrBook
func NewDefaultAddrBook ¶
func NewDefaultAddrBook(proc goprocess.Process, s storage.Storage, bus eventbus.Bus) (peerstore.AddrBook, error)
NewDefaultAddrBook creates a default addrbook
func NewDefaultPeerstoreWithAddrBook ¶
func NewDefaultPeerstoreWithAddrBook(proc goprocess.Process, s storage.Storage, ab peerstore.AddrBook) (peerstore.Peerstore, error)
NewDefaultPeerstoreWithAddrBook creates a default peerstore for P2P
func NewKeyBook ¶
NewKeyBook creates a keybook using storage.Table
func NewPeerMetadata ¶
NewPeerMetadata creates a metadata store backed by a persistent db. It uses gob for serialisation.
See `init()` to learn which types are registered by default. Modules wishing to store values of other types will need to `gob.Register()` them explicitly, or else callers will receive runtime errors.
Types ¶
Click to show internal directories.
Click to hide internal directories.