Versions in this module Expand all Collapse all v1 v1.6.1 Jul 9, 2019 Changes in this version + var Default = NewRegistry() + var ProcessStartTags []string + func BuildServiceMeta() map[string]string + func GetClient(name string) (string, client.Client) + func GetPeers() map[string]*Peer + func GetProcesses() map[string]*Process + func Init(opts ...Option) + func PeerClientSelector(srvName string, targetPeer string) selector.SelectOption + type Nodes []*registry.Node + func (n Nodes) StringArray() []string + type Option func(*Options) + func Name(n string) Option + func PollInterval(interval time.Duration) Option + type Options struct + Context context.Context + Name string + PollInterval time.Duration + type Peer struct + func NewPeer(address string, nodeMeta ...map[string]string) *Peer + func (p *Peer) Add(c *registry.Service, id string) + func (p *Peer) Delete(c *registry.Service, id string) + func (p *Peer) GetAddress() string + func (p *Peer) GetHostname() string + func (p *Peer) GetServices(name ...string) []*registry.Service + func (p *Peer) IsInitial() bool + type Process struct + Id string + MetricsPort int + ParentId string + PeerAddress string + PeerId string + Services map[string]string + StartTag string + func NewProcess(pid string) *Process + type RegisterOption func(*RegisterOptions) + func RegisterDependencies(d ...string) RegisterOption + func RegisterFlags(f ...*pflag.Flag) RegisterOption + type RegisterOptions struct + Context context.Context + Dependencies []string + Flags []*pflag.Flag + type Registry interface + AfterInit func() error + BeforeInit func() error + Deregister func(Service) error + Filter func(func(Service) bool) error + GetPeers func() map[string]*Peer + GetProcesses func() map[string]*Process + GetServiceByName func(string) Service + GetServicesByName func(string) []Service + Init func(...Option) + ListRunningServices func() ([]Service, error) + ListServices func(withExcluded ...bool) ([]Service, error) + ListServicesWithFilter func(func(Service) bool) ([]Service, error) + ListServicesWithMicroMeta func(string, ...string) ([]Service, error) + Options func() Options + Register func(Service, ...RegisterOption) error + SetServiceStopped func(string) error + String func() string + Watch func() (Watcher, error) + func NewRegistry(opts ...Option) Registry + type Result struct + Action string + Service Service + type Service interface + AddDependency func(string) + Address func() string + AfterInit func() error + AutoStart func() bool + BeforeInit func() error + Check func(context.Context) error + DAO func() interface{} + Description func() string + ForkStart func() + GetDependencies func() []Service + IsExcluded func() bool + IsGRPC func() bool + IsGeneric func() bool + IsREST func() bool + IsRunning func() bool + MatchesRegexp func(string) bool + MustBeUnique func() bool + Name func() string + Regexp func() *regexp.Regexp + RequiresFork func() bool + RunningNodes func() []*registry.Node + SetExcluded func(ex bool) + SetRunningNodes func([]*registry.Node) + Start func() + Stop func() + Tags func() []string + Version func() string + func ListRunningServices() ([]Service, error) + func ListServices(withExcluded ...bool) ([]Service, error) + func ListServicesWithFilter(fn func(Service) bool) ([]Service, error) + func ListServicesWithMicroMeta(metaName string, metaValue ...string) ([]Service, error) + type Watcher interface + Next func() (*Result, error) + Stop func() + func Watch() (Watcher, error) Incompatible versions in this module v2.0.6+incompatible Apr 23, 2020