eureka

package
v1.6.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServerDiscovery

func NewServerDiscovery(option Option) servicediscovery.IServiceDiscovery

func UseServiceDiscovery

func UseServiceDiscovery(serviceCollection *dependencyinjection.ServiceCollection)

Types

type Client

type Client struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Client maintains service instance liveness information in eureka.

func NewClient

func NewClient(conn fargoConnection, instance *fargo.Instance) *Client

NewClient returns an eureka Client acting on behalf of the provided Fargo connection and instance. See the integration test for usage examples.

func (*Client) Deregister

func (r *Client) Deregister()

Deregister implements sd.Client.

func (*Client) Register

func (r *Client) Register()

Register implements sd.Client.

type Option

type Option struct {
	ENV     *abstractions.HostEnvironment
	Address string `mapstructure:"address"`
}

type Registrar

type Registrar struct {
	// contains filtered or unexported fields
}

func (*Registrar) Destroy

func (registrar *Registrar) Destroy() error

func (*Registrar) GetAllInstances

func (registrar *Registrar) GetAllInstances(serviceName string) []servicediscovery.ServiceInstance

func (*Registrar) GetHealthyInstances

func (registrar *Registrar) GetHealthyInstances(serviceName string) []servicediscovery.ServiceInstance

func (*Registrar) GetName

func (registrar *Registrar) GetName() string

func (*Registrar) Register

func (registrar *Registrar) Register() error

func (*Registrar) Unregister

func (registrar *Registrar) Unregister() error

func (*Registrar) Update

func (registrar *Registrar) Update() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL