etcd

package module
v0.0.0-...-6b610c5 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

README

Manager

A server manager used by ETCD.

Example

go get -u github.com/panco95/manager

manager, err := manager.NewManager(
	pkgs.etcdClient.Client,
	"",
	"9000",
	"test",
)
servers, err := manager.GetAllServices()
fmt.Println(servers)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOutboundIP

func GetOutboundIP() (string, error)

Types

type Manager

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

func NewManager

func NewManager(etcd *clientV3.Client, addr, port, etcdPrefix string) (*Manager, error)

func (*Manager) GetAllServices

func (m *Manager) GetAllServices() ([]string, error)

func (*Manager) GetLocalId

func (m *Manager) GetLocalId() string

func (*Manager) GetLocalIp

func (m *Manager) GetLocalIp() string

func (*Manager) GetNodes

func (m *Manager) GetNodes() []*node

Jump to

Keyboard shortcuts

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