Documentation ¶
Index ¶
- Constants
- func DefaultImportedPlugins() (config, error)
- func LoadConfig(filePath *string) (loaded loadedConfig, err error)
- type Shim
- func (s *Shim) AddInput(input telegraf.Input) error
- func (s *Shim) AddOutput(output telegraf.Output) error
- func (s *Shim) AddProcessor(processor telegraf.Processor) error
- func (s *Shim) AddStreamingProcessor(processor telegraf.StreamingProcessor) error
- func (s *Shim) LoadConfig(filePath *string) error
- func (s *Shim) Log() telegraf.Logger
- func (s *Shim) LogName() string
- func (s *Shim) MakeMetric(m telegraf.Metric) telegraf.Metric
- func (s *Shim) Run(pollInterval time.Duration) error
- func (s *Shim) RunInput(pollInterval time.Duration) error
- func (s *Shim) RunOutput() error
- func (s *Shim) RunProcessor() error
Constants ¶
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() (config, 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 ¶
LoadConfig loads the config and returns inputs that later need to be loaded.
Types ¶
type Shim ¶
type Shim struct { Input telegraf.Input Processor telegraf.StreamingProcessor Output telegraf.Output // 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 (*Shim) AddInput ¶
AddInput adds the input to the shim. Later calls to Run() will run this input.
func (*Shim) AddProcessor ¶
AddProcessor adds the processor to the shim. Later calls to Run() will run this.
func (*Shim) AddStreamingProcessor ¶
func (s *Shim) AddStreamingProcessor(processor telegraf.StreamingProcessor) error
AddStreamingProcessor adds the processor to the shim. Later calls to Run() will run this.
func (*Shim) LoadConfig ¶
LoadConfig Adds plugins to the shim
func (*Shim) MakeMetric ¶
MakeMetric satisfies the MetricMaker interface