package pstoremanager

Import Path
	github.com/libp2p/go-libp2p/p2p/host/pstoremanager (on go.dev)

Dependency Relation
	imports 9 packages, and imported by one package

Involved Source Files pstoremanager.go
Package-Level Type Names (total 2)
/* sort by: | */
func WithCleanupInterval(t time.Duration) Option func WithGracePeriod(p time.Duration) Option func NewPeerstoreManager(pstore peerstore.Peerstore, eventBus event.Bus, network network.Network, opts ...Option) (*PeerstoreManager, error)
(*PeerstoreManager) Close() error (*PeerstoreManager) Start() *PeerstoreManager : github.com/prometheus/common/expfmt.Closer *PeerstoreManager : io.Closer func NewPeerstoreManager(pstore peerstore.Peerstore, eventBus event.Bus, network network.Network, opts ...Option) (*PeerstoreManager, error)
Package-Level Functions (total 3)
WithCleanupInterval set the clean up interval. During a clean up run peers that disconnected before the grace period are removed. If unset, the interval is set to half the grace period.
WithGracePeriod sets the grace period. If a peer doesn't reconnect during the grace period, its data is removed. Default: 1 minute.