etcd

package
v0.0.0-...-c242be3 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2017 License: MIT Imports: 8 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 {
	// contains filtered or unexported fields
}

Master is a server

func NewMaster

func NewMaster(c *commconf.Etcd) (master *Master, err error)

func (*Master) Members

func (m *Master) Members() (ms map[string]*Member)

func (*Master) WatchWorkers

func (m *Master) WatchWorkers()

type Member

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

Member is a client

type Worker

type Worker struct {
	Name string
	IP   string
	// contains filtered or unexported fields
}

func NewWorker

func NewWorker(name, ip, rootPath 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 etcd

Jump to

Keyboard shortcuts

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