Documentation ¶
Overview ¶
Package discovery is a pluggable service discovery module.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetDefaultDiscovery ¶
func SetDefaultDiscovery(d Discovery)
SetDefaultDiscovery sets the default discovery.
Types ¶
type Discovery ¶
type Discovery interface {
List(serviceName string, opt ...Option) (nodes []*registry.Node, err error)
}
Discovery is the interface that returns nodes by service name.
var DefaultDiscovery Discovery = &IPDiscovery{}
DefaultDiscovery is the default discovery determined by configuration file.
type Option ¶
type Option func(*Options)
Option modifies the Options.
func WithContext ¶
WithContext returns an Option which sets ctx.
func WithNamespace ¶
WithNamespace returns an Option which sets namespace.
Click to show internal directories.
Click to hide internal directories.