agent

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2018 License: AGPL-3.0 Imports: 20 Imported by: 2

Documentation

Index

Constants

View Source
const (
	DEFAULT_KEEPALIVE = 76
	DEFAULT_LISTEN    = "127.0.0.1:9000"
)
View Source
const (
	CMD_QUEUE_SIZE    = 10
	STATUS_QUEUE_SIZE = 10
	MAX_ERRORS        = 3
)

Variables

View Source
var (
	ErrStop = errors.New("received Stop command")
)

Functions

func LoadConfig

func LoadConfig() ([]byte, error)

Types

type Agent

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

func NewAgent

func NewAgent(config *pc.Agent, logger *pct.Logger, client pct.WebsocketClient, addr string, services map[string]pct.ServiceManager) *Agent

func (*Agent) AllStatus

func (agent *Agent) AllStatus() map[string]string

func (*Agent) GetAllConfigs

func (agent *Agent) GetAllConfigs() (interface{}, []error)

func (*Agent) GetConfig

func (agent *Agent) GetConfig() ([]proto.AgentConfig, []error)

func (*Agent) GetDefaults

func (agent *Agent) GetDefaults(cmd *proto.Cmd) (interface{}, []error)

func (*Agent) Handle

func (agent *Agent) Handle(cmd *proto.Cmd) *proto.Reply

func (*Agent) Run

func (agent *Agent) Run() error

func (*Agent) Status

func (agent *Agent) Status() map[string]string

type CollectInfoData added in v1.5.0

type CollectInfoData struct {
	Filename string
	Data     []byte
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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