Versions in this module Expand all Collapse all v0 v0.3.5 Feb 20, 2020 Changes in this version + const MetaCluster + const MetaColor + const MetaWeight + const MetaZone + type BuildOpt interface + Apply func(*BuildOptions) + func Filter(schema string, clusters map[string]struct{}) BuildOpt + func ScheduleNode(clientZone string) BuildOpt + func Subset(defaultSize int) BuildOpt + type BuildOptions struct + ClientZone string + Filter func(map[string][]*Instance) map[string][]*Instance + Scheduler func(*InstancesInfo) []*Instance + Subset func([]*Instance, int) []*Instance + SubsetSize int + type Builder interface + Build func(id string, options ...BuildOpt) Resolver + Scheme func() string + type Instance struct + Addrs []string + AppID string + Env string + Hostname string + LastTs int64 + Metadata map[string]string + Region string + Status int64 + Version string + Zone string + type InstancesInfo struct + Instances map[string][]*Instance + LastTs int64 + Scheduler *Scheduler + type NerveMember struct + Host string + Name string + Port int + type Registry interface + Close func() error + Register func(ctx context.Context, ins *Instance) (cancel context.CancelFunc, err error) + type Resolver interface + Close func() error + Fetch func(context.Context) (*InstancesInfo, bool) + Watch func() <-chan struct{} + type Scheduler struct + Clients map[string]*ZoneStrategy + type Strategy struct + Weight int64 + type ZoneStrategy struct + Zones map[string]*Strategy