Versions in this module Expand all Collapse all v1 v1.0.0 Dec 5, 2022 Changes in this version + var ErrDuplication = errors.New("discovery: instance duplicate registration") + func Build(id string) naming.Resolver + func Builder() naming.Builder + type Config struct + Env string + Host string + Nodes []string + Region string + Zone string + type Discovery struct + func New(c *Config) (d *Discovery) + func (d *Discovery) Build(appid string, opts ...naming.BuildOpt) naming.Resolver + func (d *Discovery) Close() error + func (d *Discovery) Register(ctx context.Context, ins *naming.Instance) (cancelFunc context.CancelFunc, err error) + func (d *Discovery) Reload(c *Config) + func (d *Discovery) Scheme() string + func (d *Discovery) Set(ins *naming.Instance) error + type Resolve struct + func (r *Resolve) Close() error + func (r *Resolve) Fetch(ctx context.Context) (ins *naming.InstancesInfo, ok bool) + func (r *Resolve) Watch() <-chan struct{}