discovery

package module
v0.0.0-...-91aa13a Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Master

type Master struct {
	KeysAPI client.KeysAPI
	// contains filtered or unexported fields
}

func NewMaster

func NewMaster(endpoints []string) *Master

func (*Master) AddWorker

func (m *Master) AddWorker(info *WorkerInfo)

func (*Master) UpdateWorker

func (m *Master) UpdateWorker(info *WorkerInfo)

func (*Master) WatchWorkers

func (m *Master) WatchWorkers()

type Member

type Member struct {
	InGroup bool
	IP      string
	Name    string
	CPU     int
}

Member is a client machine

type Worker

type Worker struct {
	Name    string
	IP      string
	KeysAPI client.KeysAPI
}

func NewWorker

func NewWorker(name, IP string, endpoints []string) *Worker

func (*Worker) HeartBeat

func (w *Worker) HeartBeat()

type WorkerInfo

type WorkerInfo struct {
	Name string
	IP   string
	CPU  int
}

workerInfo is the service register information to etcdx

func NodeToWorkerInfo

func NodeToWorkerInfo(node *client.Node) *WorkerInfo

Jump to

Keyboard shortcuts

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