agent

package
v0.0.0-...-89e84b7 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2014 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OP_AVG = "avg"
	OP_SUM = "sum"
	OP_MAX = "max"
	OP_MIN = "min"
)

Variables

View Source
var L, _ = syslog.New(syslog.LOG_INFO, "SYCWAGENT")
View Source
var (
	VERSION string
)

Functions

func Capture

func Capture(conf *AgentConf)

Start the data capture

The agent will listen for incoming messages on port 1234 (by default) via UDP/IP socket

Types

type AgentConf

type AgentConf struct {
	Key     string
	Secret  string
	Region  string
	Address string
	Port    int
	Loop    int
}

func NewConf

func NewConf() *AgentConf

Prepare a new agent configuration

The default parameters are

  • REGION: eu-west-1
  • ADDRESS: 127.0.0.1
  • PORT: 1234
  • LOOP: 60

func (*AgentConf) MergeWithFileAtPath

func (d *AgentConf) MergeWithFileAtPath(path string) error

Merge default configuration with a JSON configuration

func (*AgentConf) MergeWithReader

func (d *AgentConf) MergeWithReader(src io.Reader) error

Merge default configuration with a JSON configuration

type MetricData

type MetricData struct {
	Namespace string
	Metric    string
	Unit      string
	Value     float64
	Op        string
}

func (*MetricData) Datum

func (h *MetricData) Datum() cloudwatch.MetricDatum

func (*MetricData) Key

func (h *MetricData) Key() string

func (*MetricData) Update

func (h *MetricData) Update(point *MetricData)

type Samples

type Samples struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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