Documentation ¶
Index ¶
- func NewServerDiscovery(option Config) servicediscovery.IServiceDiscovery
- func NewServerDiscoveryWithDI(configuration abstractions.IConfiguration, env *abstractions.HostEnvironment) servicediscovery.IServiceDiscovery
- func UseServiceDiscovery(serviceCollection *dependencyinjection.ServiceCollection)
- type Auth
- type Config
- type Registrar
- func (r *Registrar) Destroy() error
- func (r *Registrar) GetAllInstances(serviceName string) []servicediscovery.ServiceInstance
- func (r *Registrar) GetAllServices() ([]*servicediscovery.Service, error)
- func (r *Registrar) GetHealthyInstances(serviceName string) []servicediscovery.ServiceInstance
- func (r *Registrar) GetName() string
- func (r *Registrar) Register() error
- func (r *Registrar) Unregister() error
- func (r *Registrar) Update() error
- func (r *Registrar) Watch(opts ...servicediscovery.WatchOption) (servicediscovery.Watcher, error)
- type Watcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewServerDiscovery ¶
func NewServerDiscovery(option Config) servicediscovery.IServiceDiscovery
func NewServerDiscoveryWithDI ¶
func NewServerDiscoveryWithDI(configuration abstractions.IConfiguration, env *abstractions.HostEnvironment) servicediscovery.IServiceDiscovery
func UseServiceDiscovery ¶
func UseServiceDiscovery(serviceCollection *dependencyinjection.ServiceCollection)
Types ¶
type Config ¶
type Config struct { ENV *abstractions.HostEnvironment Address []string `mapstructure:"address" config:"address"` Namespace string `mapstructure:"namespace" config:"namespace"` Ttl int64 `mapstructure:"ttl" config:"ttl"` Auth *Auth `mapstructure:"auth" config:"auth"` }
type Registrar ¶
type Registrar struct {
// contains filtered or unexported fields
}
func (*Registrar) GetAllInstances ¶
func (r *Registrar) GetAllInstances(serviceName string) []servicediscovery.ServiceInstance
func (*Registrar) GetAllServices ¶
func (r *Registrar) GetAllServices() ([]*servicediscovery.Service, error)
func (*Registrar) GetHealthyInstances ¶
func (r *Registrar) GetHealthyInstances(serviceName string) []servicediscovery.ServiceInstance
func (*Registrar) Unregister ¶
func (*Registrar) Watch ¶
func (r *Registrar) Watch(opts ...servicediscovery.WatchOption) (servicediscovery.Watcher, error)
Click to show internal directories.
Click to hide internal directories.