Documentation ¶
Index ¶
- func NewServerDiscovery(option *Option) servicediscovery.IServiceDiscovery
- func NewServerDiscoveryWithDI(configuration abstractions.IConfiguration, env *abstractions.HostEnvironment) servicediscovery.IServiceDiscovery
- func UseServiceDiscovery(serviceCollection *dependencyinjection.ServiceCollection)
- type Client
- type Option
- type Registrar
- func (registrar *Registrar) Destroy() error
- func (registrar *Registrar) GetAllInstances(serviceName string) []servicediscovery.ServiceInstance
- func (registrar *Registrar) GetAllServices() ([]*servicediscovery.Service, error)
- func (registrar *Registrar) GetHealthyInstances(serviceName string) []servicediscovery.ServiceInstance
- func (registrar *Registrar) GetName() string
- func (registrar *Registrar) Register() error
- func (registrar *Registrar) Unregister() error
- func (registrar *Registrar) Update() error
- func (registrar *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 *Option) servicediscovery.IServiceDiscovery
func NewServerDiscoveryWithDI ¶
func NewServerDiscoveryWithDI(configuration abstractions.IConfiguration, env *abstractions.HostEnvironment) servicediscovery.IServiceDiscovery
func UseServiceDiscovery ¶
func UseServiceDiscovery(serviceCollection *dependencyinjection.ServiceCollection)
Types ¶
type Client ¶
Client maintains service instance liveness information in eureka.
type Option ¶
type Option struct { ENV *abstractions.HostEnvironment Address []string `mapstructure:"address" config:"address"` Ttl int `mapstructure:"ttl" config:"ttl"` DataCenter string `mapstructure:"datacenter" config:"datacenter"` }
type Registrar ¶
type Registrar struct {
// contains filtered or unexported fields
}
func (*Registrar) GetAllInstances ¶
func (registrar *Registrar) GetAllInstances(serviceName string) []servicediscovery.ServiceInstance
func (*Registrar) GetAllServices ¶
func (registrar *Registrar) GetAllServices() ([]*servicediscovery.Service, error)
func (*Registrar) GetHealthyInstances ¶
func (registrar *Registrar) GetHealthyInstances(serviceName string) []servicediscovery.ServiceInstance
func (*Registrar) Unregister ¶
func (*Registrar) Watch ¶
func (registrar *Registrar) Watch(opts ...servicediscovery.WatchOption) (servicediscovery.Watcher, error)
Click to show internal directories.
Click to hide internal directories.