Libp2p.PeerStore (libp2p_elixir v0.9.0)
Minimal peer store for tracking addresses + supported protocols.
This is intentionally small: enough to power Eth2 libp2p must-haves.
Summary
Functions
Returns a specification to start this module under a supervisor.
Types
@type peer_id() :: binary()
Functions
@spec add_addr(pid() | atom(), peer_id(), Libp2p.Multiaddr.t()) :: :ok
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec get(pid() | atom(), peer_id()) :: Libp2p.PeerInfo.t() | nil
@spec start_link(keyword()) :: GenServer.on_start()
@spec upsert(pid() | atom(), Libp2p.PeerInfo.t()) :: :ok