agent

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 27, 2014 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CMD_QUEUE_SIZE    = 10
	STATUS_QUEUE_SIZE = 10
	MAX_ERRORS        = 3
)
View Source
const (
	DEFAULT_API_HOSTNAME = "v2-cloud-api.percona.com"
)

Variables

View Source
var REVISION string = "0"

REV="$(git rev-parse HEAD)" go build -ldflags "-X github.com/percona/percon-agent/agnet.REVISION $REV"

View Source
var VERSION string = "1.0.2"

Functions

func LoadConfig

func LoadConfig() ([]byte, error)

Types

type Agent

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

func NewAgent

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

func (*Agent) AllStatus

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

statusHandler:@goroutine[2]

func (*Agent) GetConfig

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

func (*Agent) Handle

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

cmdHandler:@goroutine[3]

func (*Agent) Run

func (agent *Agent) Run() error

percona-agent:@goroutine[0]

func (*Agent) Status

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

statusHandler:@goroutine[2]

type Config

type Config struct {
	AgentUuid   string
	ApiHostname string
	ApiKey      string
	Links       map[string]string `json:",omitempty"`
}

Jump to

Keyboard shortcuts

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