memory

package
v1.8.7 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServerDiscovery

func NewServerDiscovery(serviceName string, serviceList []string, port uint64) servicediscovery.IServiceDiscovery

Types

type MemoryCache added in v1.6.7

type MemoryCache struct {
	Services []string
	Port     uint64
}

func (*MemoryCache) GetService added in v1.6.7

func (memoryCache *MemoryCache) GetService(serviceName string) (*servicediscovery.Service, error)

func (*MemoryCache) Stop added in v1.6.7

func (memoryCache *MemoryCache) Stop()

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 added in v1.6.6

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 added in v1.6.6

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

type Watcher added in v1.6.6

type Watcher struct {
	Res chan *servicediscovery.Result
	// contains filtered or unexported fields
}

func NewWatcher added in v1.6.6

func NewWatcher() *Watcher

func (*Watcher) Next added in v1.6.6

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

func (*Watcher) Stop added in v1.6.6

func (m *Watcher) Stop()

Jump to

Keyboard shortcuts

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