agents

package
v0.0.0-...-afa4f7c Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2018 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SpawnAgent

func SpawnAgent(agent Agent, s sink.Sink) error

SpawnAgent will begin running the given agent in a loop based on the interval for that agent.

Types

type Agent

type Agent interface {
	// return the config object for this agent
	GetConfig() conf.SpoonConfigAgent

	// fetch a result for this agent
	Tick(sink.Sink) error
}

The Agent type is an object that can gather and return a result.

func BuildAgent

func BuildAgent(agentConfig *conf.SpoonConfigAgent) (Agent, error)

BuildAgent will return a pointer to a constructed object that follows the Agent interface. This method will return an error if there is no constructor for the agent type or if an error occurs while constructing the object.

func NewCMDAgent

func NewCMDAgent(config *conf.SpoonConfigAgent) (Agent, error)

func NewCPUAgent

func NewCPUAgent(config *conf.SpoonConfigAgent) (Agent, error)

func NewDiskAgent

func NewDiskAgent(config *conf.SpoonConfigAgent) (Agent, error)

func NewDockerAgent

func NewDockerAgent(config *conf.SpoonConfigAgent) (Agent, error)

func NewMemAgent

func NewMemAgent(config *conf.SpoonConfigAgent) (Agent, error)

func NewMetaAgent

func NewMetaAgent(config *conf.SpoonConfigAgent) (Agent, error)

func NewNetAgent

func NewNetAgent(config *conf.SpoonConfigAgent) (Agent, error)

func NewRandomAgent

func NewRandomAgent(config *conf.SpoonConfigAgent) (Agent, error)

func NewTimeAgent

func NewTimeAgent(config *conf.SpoonConfigAgent) (Agent, error)

func NewUpTimeAgent

func NewUpTimeAgent(config *conf.SpoonConfigAgent) (Agent, error)

Jump to

Keyboard shortcuts

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