Documentation ¶
Index ¶
- Constants
- type Config
- type LoadedConfig
- type Logger
- func (l *Logger) Debug(args ...interface{})
- func (l *Logger) Debugf(format string, args ...interface{})
- func (l *Logger) Error(args ...interface{})
- func (l *Logger) Errorf(format string, args ...interface{})
- func (l *Logger) Info(args ...interface{})
- func (l *Logger) Infof(format string, args ...interface{})
- func (l *Logger) Warn(args ...interface{})
- func (l *Logger) Warnf(format string, args ...interface{})
- type Shim
- func (s *Shim) AddInput(input cua.Input) error
- func (s *Shim) AddOutput(output cua.Output) error
- func (s *Shim) AddProcessor(processor cua.Processor) error
- func (s *Shim) AddStreamingProcessor(processor cua.StreamingProcessor) error
- func (s *Shim) LoadConfig(filePath *string) error
- func (s *Shim) Log() cua.Logger
- func (s *Shim) LogName() string
- func (s *Shim) MakeMetric(m cua.Metric) cua.Metric
- func (s *Shim) Run(ctx context.Context, pollInterval time.Duration) error
- func (s *Shim) RunInput(ctx context.Context, 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 ¶
This section is empty.
Types ¶
type Config ¶ added in v0.0.12
type Config struct { Inputs map[string][]toml.Primitive Processors map[string][]toml.Primitive Outputs map[string][]toml.Primitive }
func DefaultImportedPlugins ¶
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.
type LoadedConfig ¶ added in v0.0.12
func LoadConfig ¶
func LoadConfig(filePath *string) (loaded LoadedConfig, err error)
LoadConfig loads the config and returns inputs that later need to be loaded.
type Logger ¶
type Logger struct{}
Logger defines a logging structure for plugins. external plugins can only ever write to stderr and writing to stdout would interfere with input/processor writing out of metrics.
func (*Logger) Debug ¶
func (l *Logger) Debug(args ...interface{})
Debug logs a debug message, patterned after log.Print.
func (*Logger) Error ¶
func (l *Logger) Error(args ...interface{})
Error logs an error message, patterned after log.Print.
func (*Logger) Info ¶
func (l *Logger) Info(args ...interface{})
Info logs an information message, patterned after log.Print.
type Shim ¶
type Shim struct { Input cua.Input Processor cua.StreamingProcessor Output cua.Output // contains filtered or unexported fields }
Shim allows you to wrap your inputs and run them as if they were part of circonus-unified-agent, 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 cua.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