Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Announcer ¶
type Announcer interface { // Announce announces a service. Announce(ctx context.Context, serviceName string) error }
Announcer provides a way to announce the services supported by us to the discovery service network.
type Discoverer ¶
type Discoverer interface { // SearchPeers finds peers who support the service with the given name. // This is a persistent process, so you should call this method only once for each service name. // If you want to stop finding, you should call the cancel function provided in the context. SearchPeers(ctx context.Context, serviceName string) (<-chan []ma.Multiaddr, error) }
Discoverer provides a way to find peers who support the service with the given name.
type Discovery ¶
type Discovery interface { Announcer Discoverer }
Discovery contains an Announcer and a Discoverer. Discovery provides a way to tell others how to find us and also provides a way to find others.
Click to show internal directories.
Click to hide internal directories.