p2p/host/peerstore/pstoremem/proto_book library
ProtoBook implementation for the memory-based peerstore.
Classes
- MemoryProtoBook
- A memory-based implementation of the ProtoBook interface.
- ProtoSegment
- A segment of the protocol book, used for sharding.
Functions
-
newProtoBook(
{int maxProtos = 128}) → MemoryProtoBook - Creates a new memory-based protocol book implementation.
Exceptions / Errors
- ErrTooManyProtocols
- Error thrown when too many protocols are added for a peer.