Versions in this module Expand all Collapse all v1 v1.0.1 Oct 17, 2020 Changes in this version + func NewHeadBook(ds ds.TxnDatastore) core.HeadBook + func NewKeyBook(store ds.Datastore) (core.KeyBook, error) + func NewLogstore(ctx context.Context, store ds.Batching, opts Options) (core.Logstore, error) + func NewThreadMetadata(ds ds.Datastore) core.ThreadMetadata + type DsAddrBook struct + func NewAddrBook(ctx context.Context, ds ds.Batching, opts Options) (*DsAddrBook, error) + func (ab *DsAddrBook) AddAddr(t thread.ID, p peer.ID, addr ma.Multiaddr, ttl time.Duration) error + func (ab *DsAddrBook) AddAddrs(t thread.ID, p peer.ID, addrs []ma.Multiaddr, ttl time.Duration) error + func (ab *DsAddrBook) AddrStream(ctx context.Context, t thread.ID, p peer.ID) (<-chan ma.Multiaddr, error) + func (ab *DsAddrBook) Addrs(t thread.ID, p peer.ID) ([]ma.Multiaddr, error) + func (ab *DsAddrBook) ClearAddrs(t thread.ID, p peer.ID) error + func (ab *DsAddrBook) Close() error + func (ab *DsAddrBook) LogsWithAddrs(t thread.ID) (peer.IDSlice, error) + func (ab *DsAddrBook) SetAddr(t thread.ID, p peer.ID, addr ma.Multiaddr, ttl time.Duration) error + func (ab *DsAddrBook) SetAddrs(t thread.ID, p peer.ID, addrs []ma.Multiaddr, ttl time.Duration) error + func (ab *DsAddrBook) ThreadsFromAddrs() (thread.IDSlice, error) + func (ab *DsAddrBook) UpdateAddrs(t thread.ID, p peer.ID, oldTTL time.Duration, newTTL time.Duration) error + type Options struct + CacheSize uint + GCInitialDelay time.Duration + GCPurgeInterval time.Duration + func DefaultOpts() Options