agent

package
v0.0.0-...-db55309 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

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

func New

func New(m *plugin_models.GetAppModel, p Parser, opts ...AgentOpt) *Agent

func (*Agent) GetMetrics

func (a *Agent) GetMetrics(ctx context.Context) (outputs []InstanceMetric, err error)

type AgentOpt

type AgentOpt func(*Agent)

func WithClient

func WithClient(c HTTPClient) AgentOpt

func WithMetricsPath

func WithMetricsPath(p string) AgentOpt

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

type InstanceMetric

type InstanceMetric struct {
	Instance int
	Error    string
	Metrics  map[string]interface{}
}

type Parser

type Parser interface {
	Parse([]byte) (map[string]interface{}, error)
}

Jump to

Keyboard shortcuts

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