Documentation ¶
Index ¶
- Constants
- Variables
- func AssertNick(pid p2peer.ID) error
- func ConnectAndProtect(ctx context.Context, h host.Host, pai p2peer.AddrInfo) error
- func DeleteNick(id string)
- func IsKnown(peerID p2peer.ID) bool
- func Lookup(q string) string
- func LookupNick(peerID p2peer.ID) string
- func Nick(q string) (string, error)
- func Nicks() map[string]string
- func PeerAddrInfoFromID(h host.Host, id p2peer.ID) (p2peer.AddrInfo, error)
- func PeerAddrInfoFromPeerIDString(h host.Host, id string) (p2peer.AddrInfo, error)
- func Protect(h host.Host, id p2peer.ID) error
- func SetNick(id, nick string) error
- func UnprotectPeer(h host.Host, id p2peer.ID)
- func WatchCSV() error
Constants ¶
View Source
const DEFAULT_TAG_VALUE = 100
Variables ¶
Functions ¶
func AssertNick ¶ added in v0.4.0
If a nick is not found, it creates and sets a new one.
func ConnectAndProtect ¶ added in v0.3.0
func DeleteNick ¶ added in v0.4.0
func DeleteNick(id string)
func Lookup ¶
Lookup takes an input string that can be either a nick or an ID, and returns the corresponding ID if found; otherwise, it returns the input.
func LookupNick ¶
LookupNick looks for a peer's nick by its ID. If it does not exist it returns the input
func PeerAddrInfoFromID ¶ added in v0.3.0
func PeerAddrInfoFromPeerIDString ¶ added in v0.3.0
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.