shim

package
v1.22.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: MIT Imports: 16 Imported by: 1

README

Telegraf Execd Go Shim

This is deprecated. Please see /plugins/common/shim/README.md

Documentation

Index

Constants

View Source
const (
	// PollIntervalDisabled is used to indicate that you want to disable polling,
	// as opposed to duration 0 meaning poll constantly.
	PollIntervalDisabled = time.Duration(0)
)

Variables

This section is empty.

Functions

func DefaultImportedPlugins

func DefaultImportedPlugins() (i []telegraf.Input, e error)

DefaultImportedPlugins defaults to whatever plugins happen to be loaded and have registered themselves with the registry. This makes loading plugins without having to define a config dead easy.

func LoadConfig

func LoadConfig(filePath *string) ([]telegraf.Input, error)

LoadConfig loads the config and returns inputs that later need to be loaded.

Types

type Shim

type Shim struct {
	Inputs []telegraf.Input
	// contains filtered or unexported fields
}

Shim allows you to wrap your inputs and run them as if they were part of Telegraf, except built externally.

func New

func New() *Shim

New creates a new shim interface

func (*Shim) AddInput

func (s *Shim) AddInput(input telegraf.Input) error

AddInput adds the input to the shim. Later calls to Run() will run this input.

func (*Shim) AddInputs

func (s *Shim) AddInputs(newInputs []telegraf.Input) error

AddInputs adds multiple inputs to the shim. Later calls to Run() will run these.

func (*Shim) LoadConfig

func (s *Shim) LoadConfig(filePath *string) error

LoadConfig loads and adds the inputs to the shim

func (*Shim) Run

func (s *Shim) Run(pollInterval time.Duration) error

Run the input plugins..

Directories

Path Synopsis
example
cmd

Jump to

Keyboard shortcuts

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