mirror of
https://github.com/libp2p/go-libp2p-peerstore.git
synced 2026-08-22 15:33:27 +08:00
35444fbc6a7b5f5e952854fd06a09c5d3fd6468d
The GC procedure consists of two tiers: lookahead and purge. The lookahead tier runs less frequently (default 12 hours) than the purge tier (default 5 minutes). A lookahead round traverses the entire store and picks entries that need to be visited in the current lookahead window, pinning those entries in a separate region in the KV store, indexed by the next visit timestamp. A purge round iterates over the lookahead window only, and refreshes the entries that require a visit. It removes them from the lookahead region unless the entry requires another visit within the current window.
go-libp2p-peerstore
An object to manage peers, their addresses, and other metadata about them.
Install
go get github.com/libp2p/go-libp2p-peerstore
Usage
Check out the GoDocs.
Contribute
Feel free to join in. All welcome. Open an issue!
This repository falls under the IPFS Code of Conduct.
Want to hack on IPFS?
License
MIT
Languages
Go
100%
