Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PeerNotFoundError ¶
type PeerNotFoundError struct {
// contains filtered or unexported fields
}
PeerNotFoundError indicates that no peer could be found for the given key.
type Router ¶
type Router interface { // Net returns the network interface. Net() peernet.Network // Resolve resolves the given key to a peer address. Resolve(ctx context.Context, key string, allowSelf bool, count int) (<-chan PeerInfo, error) // ResolveWithCache is like Resolve but it also returns a function callback that can be used to cache that a key could not be resolved. ResolveWithCache(ctx context.Context, key string, allowSelf bool, count int) (<-chan PeerInfo, func(), error) // Advertise advertises the given keys to the network. Advertise(ctx context.Context, keys []string) error // Close closes the router. Close() error }
Router provides an interface to a peered network.
Click to show internal directories.
Click to hide internal directories.