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)
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)
Package-Level Functions (total 3)
func NewPeerstoreManager(pstore peerstore.Peerstore, eventBus event.Bus, network network.Network, opts ...Option) (*PeerstoreManager, error)
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.
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |