Versions in this module Expand all Collapse all v2 v2.6.5 Mar 21, 2024 v2.6.4 Mar 19, 2024 Changes in this version + const DefaultDeployment + const DefaultHead + const DefaultNamespace + const DefaultProtocol + const DefaultSeparator + const DefaultVersion + const EndpointHostPortDelimiter + const EndpointsDelimiter + const EnvDeployment + const EnvName + const EnvNamespace + const EnvPrefix + const EnvVersion + const MDInsecure + const MDProtocol + const MDWeight + const Schema + func Deregister(ctx context.Context, service Service) error + func SetRegistry(registry Registry) + type Discovery interface + Search func(ctx context.Context, in SearchInput) (result []Service, err error) + Watch func(ctx context.Context, key string) (watcher Watcher, err error) + type Endpoint interface + Host func() string + Port func() int + String func() string + func NewEndpoint(address string) Endpoint + type Endpoints []Endpoint + func NewEndpoints(addresses string) Endpoints + func (es Endpoints) String() string + type LocalEndpoint struct + func (e *LocalEndpoint) Host() string + func (e *LocalEndpoint) Port() int + func (e *LocalEndpoint) String() string + type LocalService struct + Deployment string + Endpoints Endpoints + Head string + Metadata Metadata + Name string + Namespace string + Version string + func (s *LocalService) GetEndpoints() Endpoints + func (s *LocalService) GetKey() string + func (s *LocalService) GetMetadata() Metadata + func (s *LocalService) GetName() string + func (s *LocalService) GetPrefix() string + func (s *LocalService) GetValue() string + func (s *LocalService) GetVersion() string + type Metadata map[string]interface + func (m Metadata) Get(key string) *gvar.Var + func (m Metadata) IsEmpty() bool + func (m Metadata) Set(key string, value interface{}) + func (m Metadata) Sets(kvs map[string]interface{}) + type Registrar interface + Deregister func(ctx context.Context, service Service) error + Register func(ctx context.Context, service Service) (registered Service, err error) + type Registry interface + func GetRegistry() Registry + type SearchInput struct + Metadata Metadata + Name string + Prefix string + Version string + type Service interface + GetEndpoints func() Endpoints + GetKey func() string + GetMetadata func() Metadata + GetName func() string + GetPrefix func() string + GetValue func() string + GetVersion func() string + func Get(ctx context.Context, name string) (service Service, err error) + func GetAndWatch(ctx context.Context, name string, watch ServiceWatch) (service Service, err error) + func GetAndWatchWithDiscovery(ctx context.Context, discovery Discovery, name string, watch ServiceWatch) (service Service, err error) + func GetWithDiscovery(ctx context.Context, discovery Discovery, name string) (service Service, err error) + func NewServiceWithKV(key, value string) (Service, error) + func NewServiceWithName(name string) Service + func Register(ctx context.Context, service Service) (Service, error) + func Search(ctx context.Context, in SearchInput) ([]Service, error) + type ServiceWatch func(service Service) + type Watcher interface + Close func() error + Proceed func() (services []Service, err error) + func Watch(ctx context.Context, key string) (Watcher, error)