shim

package
v1.40.4 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 16 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 command

Jump to

Keyboard shortcuts

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