Documentation ¶
Index ¶
- type Discovery
- func (d *Discovery) Cancel(c context.Context, arg *model.ArgCancel) (err error)
- func (d *Discovery) DelConns(arg *model.ArgPolls)
- func (d *Discovery) Fetch(c context.Context, arg *model.ArgFetch) (info *model.InstanceInfo, err error)
- func (d *Discovery) FetchAll(c context.Context) (im map[string][]*model.Instance)
- func (d *Discovery) Fetchs(c context.Context, arg *model.ArgFetchs) (is map[string]*model.InstanceInfo, err error)
- func (d *Discovery) Nodes(c context.Context) (nsi []*model.Node)
- func (d *Discovery) Polls(c context.Context, arg *model.ArgPolls) (ch chan map[string]*model.InstanceInfo, new bool, miss []string, err error)
- func (d *Discovery) Protected() bool
- func (d *Discovery) Register(c context.Context, ins *model.Instance, latestTimestamp int64, ...)
- func (d *Discovery) Renew(c context.Context, arg *model.ArgRenew) (i *model.Instance, err error)
- func (d *Discovery) Set(c context.Context, arg *model.ArgSet) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Discovery ¶
type Discovery struct {
// contains filtered or unexported fields
}
Discovery discovery.
func (*Discovery) Fetch ¶
func (d *Discovery) Fetch(c context.Context, arg *model.ArgFetch) (info *model.InstanceInfo, err error)
Fetch fetch all instances by appid.
func (*Discovery) Fetchs ¶
func (d *Discovery) Fetchs(c context.Context, arg *model.ArgFetchs) (is map[string]*model.InstanceInfo, err error)
Fetchs fetch multi app by appids.
func (*Discovery) Polls ¶
func (d *Discovery) Polls(c context.Context, arg *model.ArgPolls) (ch chan map[string]*model.InstanceInfo, new bool, miss []string, err error)
Polls hangs request and then write instances when that has changes, or return NotModified.
func (*Discovery) Protected ¶
Protected return if service in init protect mode. if service in init protect mode,only support write, read operator isn't supported.
func (*Discovery) Register ¶
func (d *Discovery) Register(c context.Context, ins *model.Instance, latestTimestamp int64, replication bool, fromzone bool)
Register a new instance.
Click to show internal directories.
Click to hide internal directories.