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, opts ...Option) error }
Announcer provides a way to announce the service supported by us to the discovery service network.
type Discoverer ¶
type Discoverer interface { // FindPeers find peers who support the service which name is the given. // This is a persistent process, so you should call this method only once for each service name. // If you want to stop finding, the cancel function for context given should be call. FindPeers(ctx context.Context, serviceName string, opts ...Option) (<-chan ma.Multiaddr, error) }
Discoverer provides a way to find peers who support the service which name is the given.
type Discovery ¶
type Discovery interface { Announcer Discoverer }
Discovery contains an Announcer and a Discoverer. Discovery provides a way to tell others how to find ourselves also provides a way to find others.
type Option ¶
Option is a function for apply some value to Options.
Click to show internal directories.
Click to hide internal directories.