Documentation ¶
Overview ¶
Package agent contains code for pushing metric indicators to reliably entity api
Index ¶
- func LabelsFromPairs(selector string) ([]entities.Labels, error)
- func SelectorFromPairs(selector string) (string, error)
- func SetLogger(l Logger)
- func ValidateBase64Selector(selector string) (string, error)
- type Error
- type ErrorHandler
- type ExitSignal
- type IndicatorHandler
- type Job
- type Labels
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LabelsFromPairs ¶ added in v0.48.0
func SelectorFromPairs ¶ added in v0.48.0
func ValidateBase64Selector ¶ added in v0.45.0
checks for and validates base64 encoded selectors
Types ¶
type ExitSignal ¶
type ExitSignal struct{}
ExitSignal - empty struct type used to trigger agent Job close
type IndicatorHandler ¶
IndicatorHandler - type used to handle indicators after they are generated
type Job ¶
type Job struct { // The number of seconds between indicator calculations and pushing Interval int64 // Objectives - The objectives to create indicators from Objectives []*entities.Objective // contains filtered or unexported fields }
Job - an Agent job defines the objectives and handlers for generating indicators.
func NewJob ¶
NewJob - creates a new agent job If the interval is set to 0, the Job will run a single iteration
func (*Job) ErrorFunc ¶
func (j *Job) ErrorFunc(f ErrorHandler) *Job
ErrorFunc - set the job ErrorHandler value
func (*Job) IndicatorFunc ¶
func (j *Job) IndicatorFunc(f IndicatorHandler) *Job
IndicatorFunc - set the job IndicatorHandler value
type Logger ¶
type Logger interface { Infof(format string, args ...interface{}) Info(args ...interface{}) Debugf(format string, args ...interface{}) Debug(args ...interface{}) Warnf(format string, args ...interface{}) Warn(args ...interface{}) Errorf(format string, args ...interface{}) Error(args ...interface{}) }
Logger - interface used to fascilitate logging within the agent
Click to show internal directories.
Click to hide internal directories.