agent

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ResultLineLimit = 30

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	*Config
	// contains filtered or unexported fields
}

func CreateAgent

func CreateAgent(config *Config) *Agent

func (*Agent) GetUrlPing

func (agent *Agent) GetUrlPing() (*url.URL, error)

func (*Agent) GetUrlTaskDone

func (agent *Agent) GetUrlTaskDone() (*url.URL, error)

func (*Agent) GetUrlTaskRequest

func (agent *Agent) GetUrlTaskRequest() (*url.URL, error)

func (*Agent) Run

func (agent *Agent) Run()

func (*Agent) StartHeartBeatMonitor added in v0.2.0

func (agent *Agent) StartHeartBeatMonitor()

StartHeartBeatMonitor signal only

func (*Agent) StartTaskRequestMonitor added in v0.2.0

func (agent *Agent) StartTaskRequestMonitor()

func (*Agent) StartTaskWorkMonitor added in v0.2.0

func (agent *Agent) StartTaskWorkMonitor()

type Config

type Config struct {
	Registry     RegistryConfig `json:"registry"`
	Period       int            `json:"period"`
	MachineLabel string         `json:"machineLabel"`
}

func (*Config) GetPeriod

func (c *Config) GetPeriod() time.Duration

func (*Config) GetRegistry

func (c *Config) GetRegistry() string

type Event

type Event struct{}

type RegistryConfig

type RegistryConfig struct {
	Address string `json:"address"`
	Port    int    `json:"port"`
}

Jump to

Keyboard shortcuts

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