tmcevents

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Flatten

func Flatten(m map[string]interface{}) map[string]interface{}

Flatten takes a map and returns a new one where nested maps are replaced by dot-delimited keys.

Types

type TmcEvents

type TmcEvents struct {
	TmcHostname string   `toml:"tmc_hostname"`
	CspHostname string   `toml:"csp_hostname"`
	CspToken    string   `toml:"csp_token"`
	Events      []string `toml:"events"`

	Log telegraf.Logger `toml:"-"`
	// contains filtered or unexported fields
}

TmcEvents defines field needed

func (*TmcEvents) Description

func (r *TmcEvents) Description() string

Description returns plugin desription

func (*TmcEvents) Gather

func (r *TmcEvents) Gather(a telegraf.Accumulator) error

Gather connects to the TMC api to get the stream of events, it will stay open for a period of time and close when no events are present, the telegraf plugin will re-run this command constantly

func (*TmcEvents) Init

func (r *TmcEvents) Init() error

Init inits the plugins

func (*TmcEvents) SampleConfig

func (r *TmcEvents) SampleConfig() string

SampleConfig returns the sample plugin configuration

Jump to

Keyboard shortcuts

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