command

package
v0.31.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2016 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAgent added in v0.16.0

func NewAgent(conf *config.Config) *agent.Agent

NewAgent creates a new instance of agent.Agent from its configuration conf.

func Run

func Run(c *Context, termCh chan struct{}) error

Run starts the main metric collecting logic and this function will never return.

func RunOnce added in v0.15.0

func RunOnce(conf *config.Config) error

RunOnce collects specs and metrics, then output them to stdout.

Types

type Context added in v0.19.0

type Context struct {
	Agent                 *agent.Agent
	Config                *config.Config
	Host                  *mackerel.Host
	API                   *mackerel.API
	CustomIdentifierHosts map[string]*mackerel.Host
}

Context context object

func Prepare added in v0.8.0

func Prepare(conf *config.Config) (*Context, error)

Prepare sets up API and registers the host data to the Mackerel server. Use returned values to call Run().

func (*Context) UpdateHostSpecs added in v0.19.0

func (c *Context) UpdateHostSpecs()

UpdateHostSpecs updates the host information that is already registered on Mackerel.

Jump to

Keyboard shortcuts

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