Documentation
¶
Overview ¶
Package discovery provides discovery protocol interfaces and its implementations. The main API are:
- `Discovery` - provides all API for discovery protocol, such as resolving peer addresses by locator IDs. It keeps local peers table in sync, it checks the local table before query remote providers, and update it on success lookup. It can be created using `NewDiscovery` factory function.
- `Provider` - remote discovery provider API, It performs query lookup operation in any remote kind of storage, E.g. it may have implementations for database, etcd, DHT, etc.
- `ErrNotFound` - error returned when peer was not found. The error can be checked with `errors.As(err, ¬Found)`.
- `ErrFailedToResolve` - generic error wrapper, encapsulates more concrete errors, to get caused errors use `errors.Unwrap` or `errors.As()`
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalTable ¶
type LocalTable struct {
// contains filtered or unexported fields
}
LocalTable is a local in memory peer table
Click to show internal directories.
Click to hide internal directories.