redis_discovery

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisDiscovery

type RedisDiscovery struct {
	discovery.ServiceDiscovery
	// contains filtered or unexported fields
}

RedisDiscovery

func NewRedisDiscovery

func NewRedisDiscovery(adminRedis *eredis.RedisClient) *RedisDiscovery

NewRedisDiscovery return a RedisDiscovery

func (*RedisDiscovery) Close

func (s *RedisDiscovery) Close() error

Close closes the redis

func (*RedisDiscovery) GetInfo

func (this *RedisDiscovery) GetInfo() ([]string, error)

GetInfo get node information

func (*RedisDiscovery) GetServerList added in v1.0.1

func (this *RedisDiscovery) GetServerList() (map[string]string, error)

func (*RedisDiscovery) Register

func (this *RedisDiscovery) Register() error

Register registers the NodeID and notify other nodes

func (*RedisDiscovery) SetNodeAddr added in v1.0.1

func (this *RedisDiscovery) SetNodeAddr(addr string)

SetNodeAddr sets a addr

func (*RedisDiscovery) UpdateInfo

func (this *RedisDiscovery) UpdateInfo(nodeInfoByte []byte) error

UpdateInfo Update the information for this node

func (*RedisDiscovery) WatchService

func (this *RedisDiscovery) WatchService(watchChan discovery.WatchChan)

WatchService Listens for a new node to start

Jump to

Keyboard shortcuts

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