etcd

package
v0.0.0-...-b81122d Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SpiderData

type SpiderData struct {
	DownloadFailCount int32 `json:"download_fail_count"`
	DownloadCount     int32 `json:"download_count"`
	URLNum            int32 `json:"url_num"`
	WaitURLNum        int   `json:"wait_url_num"`
	CrawlerResultNum  int32 `json:"crawler_result_num"`
}

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                 `json:"name"`
	IP         string                 `json:"ip"`
	CPU        int                    `json:"cpu"`
	MetaData   map[string]string      `json:"metadata"`
	SpiderData map[string]*SpiderData `json:"spider_data"`
}

Jump to

Keyboard shortcuts

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