eureka

package
v1.9.5 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: MIT Imports: 14 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" 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) Destroy

func (registrar *Registrar) Destroy() error

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) 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

func (*Registrar) Watch

func (registrar *Registrar) Watch(opts ...servicediscovery.WatchOption) (servicediscovery.Watcher, error)

type Watcher

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

func (*Watcher) Next

func (w *Watcher) Next() (*servicediscovery.Result, error)

func (*Watcher) Stop

func (w *Watcher) Stop()

Jump to

Keyboard shortcuts

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