Documentation ¶
Overview ¶
Package addr provides utility functions to handle peer addresses.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Source ¶
AddrSource is a source of addresses. It allows clients to retrieve a set of addresses at a last possible moment in time. It is used to query a set of addresses that may change over time, as a result of the network changing interfaces or mappings.
func CombineSources ¶
CombineSources returns a new AddrSource which is the concatenation of all input AddrSources:
combined := CombinedSources(a, b) combined.Addrs() // append(a.Addrs(), b.Addrs()...)
func UniqueSource ¶
UniqueSource returns a new AddrSource which omits duplicate addresses from the inputs:
unique := UniqueSource(a, b) unique.Addrs() // append(a.Addrs(), b.Addrs()...) // but only adds each addr once.
Click to show internal directories.
Click to hide internal directories.