agent

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2016 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_KEEPALIVE = 76
	DEFAULT_PIDFILE   = "percona-agent.pid"
	DEFAULT_LISTEN    = "127.0.0.1:9000"
)
View Source
const (
	CMD_QUEUE_SIZE              = 10
	STATUS_QUEUE_SIZE           = 10
	MAX_ERRORS                  = 3
	MIN_SUPPORTED_MYSQL_VERSION = "5.1.0"
)

Variables

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

Functions

func JSONResponse

func JSONResponse(w http.ResponseWriter, statusCode int, v interface{})

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() (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 LocalInterface

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

func NewLocalInterface

func NewLocalInterface(addr string, agent *Agent, repo *instance.Repo) *LocalInterface

func (*LocalInterface) Run

func (lo *LocalInterface) Run()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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