Documentation
¶
Index ¶
- Constants
- func DefaultSampleConfig(sampleConfig string) []byte
- func FromTestMetric(met *Metric) telegraf.Metric
- func GetLocalHost() string
- func GetRandomString(chars int) string
- func IgnoreFields(names ...string) cmp.Option
- func IgnoreTags(names ...string) cmp.Option
- func IgnoreTime() cmp.Option
- func IgnoreType() cmp.Option
- func MetricEqual(expected, actual telegraf.Metric, opts ...cmp.Option) bool
- func MockMetrics() []telegraf.Metric
- func MockMetricsWithValue(value float64) []telegraf.Metric
- func NewPKI(keyPath string) *pki
- func OnlyTags() cmp.Option
- func ParseLinesFromFile(filename string) ([]string, error)
- func ParseMetricsFrom(lines []string, header string, parser LineParser) ([]telegraf.Metric, error)
- func ParseMetricsFromFile(filename string, parser telegraf.Parser) ([]telegraf.Metric, error)
- func ParseRawLinesFrom(lines []string, header string) ([]string, error)
- func PrintMetrics(m []telegraf.Metric)
- func RaiseNofileLimit(hc *container.HostConfig)
- func RequireMetricEqual(t testing.TB, expected, actual telegraf.Metric, opts ...cmp.Option)
- func RequireMetricsEqual(t testing.TB, expected, actual []telegraf.Metric, opts ...cmp.Option)
- func RequireMetricsStructureEqual(t testing.TB, expected, actual []telegraf.Metric, opts ...cmp.Option)
- func RequireMetricsStructureSubset(t testing.TB, expected, actual []telegraf.Metric, opts ...cmp.Option)
- func RequireMetricsSubset(t testing.TB, expected, actual []telegraf.Metric, opts ...cmp.Option)
- func SortMetrics() cmp.Option
- func TempSocket(tb testing.TB) string
- func TestMetric(value interface{}, name ...string) telegraf.Metric
- func WithinDefaultDelta(dt float64) bool
- type Accumulator
- func (a *Accumulator) AddCounter(measurement string, fields map[string]interface{}, tags map[string]string, ...)
- func (a *Accumulator) AddError(err error)
- func (a *Accumulator) AddFields(measurement string, fields map[string]interface{}, tags map[string]string, ...)
- func (a *Accumulator) AddGauge(measurement string, fields map[string]interface{}, tags map[string]string, ...)
- func (a *Accumulator) AddHistogram(measurement string, fields map[string]interface{}, tags map[string]string, ...)
- func (a *Accumulator) AddMetric(m telegraf.Metric)
- func (a *Accumulator) AddMetrics(metrics []telegraf.Metric)
- func (a *Accumulator) AddSummary(measurement string, fields map[string]interface{}, tags map[string]string, ...)
- func (a *Accumulator) AddTrackingMetric(m telegraf.Metric) telegraf.TrackingID
- func (a *Accumulator) AddTrackingMetricGroup(group []telegraf.Metric) telegraf.TrackingID
- func (a *Accumulator) AssertContainsFields(t *testing.T, measurement string, fields map[string]interface{})
- func (a *Accumulator) AssertContainsTaggedFields(t *testing.T, measurement string, fields map[string]interface{}, ...)
- func (a *Accumulator) AssertDoesNotContainMeasurement(t *testing.T, measurement string)
- func (a *Accumulator) AssertDoesNotContainsTaggedFields(t *testing.T, measurement string, fields map[string]interface{}, ...)
- func (a *Accumulator) BoolField(measurement, field string) (v, ok bool)
- func (a *Accumulator) ClearMetrics()
- func (a *Accumulator) Debug() bool
- func (a *Accumulator) Delivered() <-chan telegraf.DeliveryInfo
- func (*Accumulator) DisablePrecision()
- func (a *Accumulator) FirstError() error
- func (a *Accumulator) FloatField(measurement, field string) (float64, bool)
- func (a *Accumulator) GatherError(gf func(telegraf.Accumulator) error) error
- func (a *Accumulator) Get(measurement string) (*Metric, bool)
- func (a *Accumulator) GetDeliveries() []telegraf.DeliveryInfo
- func (a *Accumulator) GetTelegrafMetrics() []telegraf.Metric
- func (a *Accumulator) HasField(measurement, field string) bool
- func (a *Accumulator) HasFloatField(measurement, field string) bool
- func (a *Accumulator) HasInt32Field(measurement, field string) bool
- func (a *Accumulator) HasInt64Field(measurement, field string) bool
- func (a *Accumulator) HasIntField(measurement, field string) bool
- func (a *Accumulator) HasMeasurement(measurement string) bool
- func (a *Accumulator) HasPoint(measurement string, tags map[string]string, fieldKey string, ...) bool
- func (a *Accumulator) HasStringField(measurement, field string) bool
- func (a *Accumulator) HasTag(measurement, key string) bool
- func (a *Accumulator) HasTimestamp(measurement string, timestamp time.Time) bool
- func (a *Accumulator) HasUIntField(measurement, field string) bool
- func (a *Accumulator) Int32Field(measurement, field string) (int32, bool)
- func (a *Accumulator) Int64Field(measurement, field string) (int64, bool)
- func (a *Accumulator) IntField(measurement, field string) (int, bool)
- func (a *Accumulator) NDelivered() int
- func (a *Accumulator) NFields() int
- func (a *Accumulator) NMetrics() uint64
- func (a *Accumulator) SetDebug(debug bool)
- func (*Accumulator) SetPrecision(time.Duration)
- func (a *Accumulator) StringField(measurement, field string) (string, bool)
- func (a *Accumulator) TagSetValue(measurement, key string) string
- func (a *Accumulator) TagValue(measurement, key string) string
- func (a *Accumulator) Uint64Field(measurement, field string) (uint64, bool)
- func (a *Accumulator) Wait(n int)
- func (a *Accumulator) WaitError(n int)
- func (a *Accumulator) WithTracking(maxTracked int) telegraf.TrackingAccumulator
- type CaptureLogger
- func (*CaptureLogger) AddAttribute(string, interface{})
- func (l *CaptureLogger) Clear()
- func (l *CaptureLogger) Debug(args ...interface{})
- func (l *CaptureLogger) Debugf(format string, args ...interface{})
- func (l *CaptureLogger) Error(args ...interface{})
- func (l *CaptureLogger) Errorf(format string, args ...interface{})
- func (l *CaptureLogger) Errors() []string
- func (l *CaptureLogger) Info(args ...interface{})
- func (l *CaptureLogger) Infof(format string, args ...interface{})
- func (l *CaptureLogger) LastError() string
- func (*CaptureLogger) Level() telegraf.LogLevel
- func (l *CaptureLogger) Messages() []Entry
- func (l *CaptureLogger) NMessages() int
- func (l *CaptureLogger) Trace(args ...interface{})
- func (l *CaptureLogger) Tracef(format string, args ...interface{})
- func (l *CaptureLogger) Warn(args ...interface{})
- func (l *CaptureLogger) Warnf(format string, args ...interface{})
- func (l *CaptureLogger) Warnings() []string
- type Container
- func (c *Container) Exec(cmds []string) (int, io.Reader, error)
- func (c *Container) GetInfo() (string, error)
- func (c *Container) LookupMappedPorts() error
- func (c *Container) Pause() error
- func (c *Container) PrintLogs()
- func (c *Container) Resume() error
- func (c *Container) Start() error
- func (c *Container) Terminate()
- type Entry
- type LineParser
- type Logger
- func (Logger) AddAttribute(string, interface{})
- 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) Level() telegraf.LogLevel
- func (l Logger) Trace(args ...interface{})
- func (l Logger) Tracef(format string, args ...interface{})
- func (l Logger) Warn(args ...interface{})
- func (l Logger) Warnf(format string, args ...interface{})
- type Metric
- type NopAccumulator
- func (*NopAccumulator) AddCounter(string, map[string]interface{}, map[string]string, ...time.Time)
- func (*NopAccumulator) AddError(error)
- func (*NopAccumulator) AddFields(string, map[string]interface{}, map[string]string, ...time.Time)
- func (*NopAccumulator) AddGauge(string, map[string]interface{}, map[string]string, ...time.Time)
- func (*NopAccumulator) AddHistogram(string, map[string]interface{}, map[string]string, ...time.Time)
- func (*NopAccumulator) AddMetric(telegraf.Metric)
- func (*NopAccumulator) AddSummary(string, map[string]interface{}, map[string]string, ...time.Time)
- func (*NopAccumulator) SetPrecision(time.Duration)
- func (*NopAccumulator) WithTracking(int) telegraf.TrackingAccumulator
- type PKIPaths
- type TestLogConsumer
Constants ¶
const ( LevelError = 'E' LevelWarn = 'W' LevelInfo = 'I' LevelDebug = 'D' LevelTrace = 'T' )
const ( DefaultDelta = 0.001 DefaultEpsilon = 0.1 )
Variables ¶
This section is empty.
Functions ¶
func DefaultSampleConfig ¶ added in v1.30.0
DefaultSampleConfig returns the sample config with the default parameters uncommented to also be able to test the validity of default setting.
func FromTestMetric ¶ added in v1.14.0
func GetLocalHost ¶ added in v0.1.4
func GetLocalHost() string
GetLocalHost returns the DOCKER_HOST environment variable, parsing out any scheme or ports so that only the IP address is returned.
func GetRandomString ¶ added in v1.34.1
GetRandomString returns a random alphanumerical string of the given length. Please note, this function is different to `internal.RandomString` as it will not use `crypto.Rand` and will therefore not rely on the entropy-pool of the host which might be drained e.g. in CI pipelines. This is useful to e.g. create random passwords for tests where security is not a concern.
func IgnoreFields ¶ added in v1.26.0
IgnoreFields disables comparison of the fields with the given names. The field-names are case-sensitive!
func IgnoreTags ¶ added in v1.27.3
IgnoreTags disables comparison of the tags with the given names. The tag-names are case-sensitive!
func IgnoreTime ¶ added in v1.14.0
IgnoreTime disables comparison of timestamp.
func IgnoreType ¶ added in v1.34.0
func MetricEqual ¶ added in v1.14.0
MetricEqual returns true if the metrics are equal.
func MockMetrics ¶ added in v1.14.0
MockMetrics returns a mock []telegraf.Metric object for using in unit tests of telegraf output sinks.
func MockMetricsWithValue ¶ added in v1.26.3
func OnlyTags ¶ added in v1.18.0
OnlyTags returns an option for keeping only "Tags" for a given Metric
func ParseLinesFromFile ¶ added in v1.24.0
ParseLinesFromFile returns the lines of the file as strings
func ParseMetricsFrom ¶ added in v1.18.0
ParseMetricsFrom parses metrics from the given lines in line-protocol following a header, with a trailing blank line
func ParseMetricsFromFile ¶ added in v1.24.0
ParseMetricsFromFile parses metrics from the given file in line-protocol
func ParseRawLinesFrom ¶ added in v1.18.0
ParseRawLinesFrom returns the raw lines between the given header and a trailing blank line
func PrintMetrics ¶ added in v1.27.3
func RaiseNofileLimit ¶ added in v1.39.0
func RaiseNofileLimit(hc *container.HostConfig)
RaiseNofileLimit is a HostConfigModifier that raises the container's nofile ulimit. Some services (e.g. mongo) refuse to start when the inherited soft limit is below their recommended minimum, which fails tests on CI hosts.
func RequireMetricEqual ¶ added in v1.14.0
RequireMetricEqual halts the test with an error if the metrics are not equal.
func RequireMetricsEqual ¶ added in v1.14.0
RequireMetricsEqual halts the test with an error if the array of metrics are not equal.
func RequireMetricsStructureEqual ¶ added in v1.27.3
func RequireMetricsStructureEqual(t testing.TB, expected, actual []telegraf.Metric, opts ...cmp.Option)
RequireMetricsStructureEqual halts the test with an error if the array of metrics is structural different. Structure means that the metric differs in either name, tag key/values, time (if not ignored) or fields. For fields ONLY the name and type are compared NOT the value.
func RequireMetricsStructureSubset ¶ added in v1.28.4
func RequireMetricsStructureSubset(t testing.TB, expected, actual []telegraf.Metric, opts ...cmp.Option)
RequireMetricsStructureSubset halts the test with an error if the expected array of metrics is not a subset of the actual metrics. The equality here is only based on the structure (i.e. key name and value types) and NOT on the actual value.
func RequireMetricsSubset ¶ added in v1.28.4
RequireMetricsSubset halts the test with an error if the expected array of metrics is not a subset of the actual metrics.
func SortMetrics ¶ added in v1.14.0
SortMetrics enables sorting metrics before comparison.
func TempSocket ¶ added in v1.23.0
func TestMetric ¶ added in v1.14.0
TestMetric Returns a simple test point:
measurement -> "test1" or name tags -> "tag1":"value1" value -> value time -> time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC)
func WithinDefaultDelta ¶ added in v1.32.3
Types ¶
type Accumulator ¶
type Accumulator struct {
Metrics []*Metric
Discard bool
Errors []error
TimeFunc func() time.Time
sync.Mutex
*sync.Cond
// contains filtered or unexported fields
}
Accumulator defines a mocked out accumulator
func (*Accumulator) AddCounter ¶ added in v1.14.0
func (*Accumulator) AddError ¶ added in v1.14.0
func (a *Accumulator) AddError(err error)
AddError appends the given error to Accumulator.Errors.
func (*Accumulator) AddFields ¶ added in v0.2.0
func (a *Accumulator) AddFields( measurement string, fields map[string]interface{}, tags map[string]string, timestamp ...time.Time, )
AddFields adds a measurement point with a specified timestamp.
func (*Accumulator) AddHistogram ¶ added in v1.14.0
func (*Accumulator) AddMetric ¶ added in v1.14.0
func (a *Accumulator) AddMetric(m telegraf.Metric)
func (*Accumulator) AddMetrics ¶ added in v1.14.0
func (a *Accumulator) AddMetrics(metrics []telegraf.Metric)
func (*Accumulator) AddSummary ¶ added in v1.14.0
func (*Accumulator) AddTrackingMetric ¶ added in v1.14.0
func (a *Accumulator) AddTrackingMetric(m telegraf.Metric) telegraf.TrackingID
func (*Accumulator) AddTrackingMetricGroup ¶ added in v1.14.0
func (a *Accumulator) AddTrackingMetricGroup(group []telegraf.Metric) telegraf.TrackingID
func (*Accumulator) AssertContainsFields ¶ added in v0.10.0
func (a *Accumulator) AssertContainsFields( t *testing.T, measurement string, fields map[string]interface{}, )
func (*Accumulator) AssertContainsTaggedFields ¶ added in v0.10.0
func (*Accumulator) AssertDoesNotContainMeasurement ¶ added in v1.14.0
func (a *Accumulator) AssertDoesNotContainMeasurement(t *testing.T, measurement string)
func (*Accumulator) AssertDoesNotContainsTaggedFields ¶ added in v1.14.0
func (*Accumulator) BoolField ¶ added in v1.14.0
func (a *Accumulator) BoolField(measurement, field string) (v, ok bool)
BoolField returns the bool value of the given measurement and field or false.
func (*Accumulator) ClearMetrics ¶ added in v1.14.0
func (a *Accumulator) ClearMetrics()
func (*Accumulator) Debug ¶ added in v0.2.0
func (a *Accumulator) Debug() bool
func (*Accumulator) Delivered ¶ added in v1.14.0
func (a *Accumulator) Delivered() <-chan telegraf.DeliveryInfo
func (*Accumulator) DisablePrecision ¶ added in v1.14.0
func (*Accumulator) DisablePrecision()
func (*Accumulator) FirstError ¶ added in v1.14.0
func (a *Accumulator) FirstError() error
func (*Accumulator) FloatField ¶ added in v1.14.0
func (a *Accumulator) FloatField(measurement, field string) (float64, bool)
FloatField returns the float64 value of the given measurement and field or false.
func (*Accumulator) GatherError ¶ added in v1.14.0
func (a *Accumulator) GatherError(gf func(telegraf.Accumulator) error) error
GatherError calls the given Gather function and returns the first error found.
func (*Accumulator) Get ¶
func (a *Accumulator) Get(measurement string) (*Metric, bool)
Get gets the specified measurement point from the accumulator
func (*Accumulator) GetDeliveries ¶ added in v1.29.0
func (a *Accumulator) GetDeliveries() []telegraf.DeliveryInfo
func (*Accumulator) GetTelegrafMetrics ¶ added in v1.14.0
func (a *Accumulator) GetTelegrafMetrics() []telegraf.Metric
GetTelegrafMetrics returns all the metrics collected by the accumulator If you are getting race conditions here then you are not waiting for all of your metrics to arrive: see Wait()
func (*Accumulator) HasField ¶ added in v1.14.0
func (a *Accumulator) HasField(measurement, field string) bool
HasField returns true if the given measurement has a field with the given name
func (*Accumulator) HasFloatField ¶ added in v0.10.0
func (a *Accumulator) HasFloatField(measurement, field string) bool
HasFloatField returns true if the given measurement has a float value
func (*Accumulator) HasInt32Field ¶ added in v1.14.0
func (a *Accumulator) HasInt32Field(measurement, field string) bool
HasInt32Field returns true if the measurement has an Int value
func (*Accumulator) HasInt64Field ¶ added in v1.14.0
func (a *Accumulator) HasInt64Field(measurement, field string) bool
HasInt64Field returns true if the measurement has an Int64 value
func (*Accumulator) HasIntField ¶ added in v0.10.0
func (a *Accumulator) HasIntField(measurement, field string) bool
HasIntField returns true if the measurement has an Int value
func (*Accumulator) HasMeasurement ¶ added in v0.1.8
func (a *Accumulator) HasMeasurement(measurement string) bool
HasMeasurement returns true if the accumulator has a measurement with the given name
func (*Accumulator) HasStringField ¶ added in v1.14.0
func (a *Accumulator) HasStringField(measurement, field string) bool
HasStringField returns true if the measurement has a String value
func (*Accumulator) HasTag ¶ added in v1.14.0
func (a *Accumulator) HasTag(measurement, key string) bool
func (*Accumulator) HasTimestamp ¶ added in v1.14.0
func (a *Accumulator) HasTimestamp(measurement string, timestamp time.Time) bool
HasTimestamp returns true if the measurement has a matching Time value
func (*Accumulator) HasUIntField ¶ added in v0.10.0
func (a *Accumulator) HasUIntField(measurement, field string) bool
HasUIntField returns true if the measurement has a UInt value
func (*Accumulator) Int32Field ¶ added in v1.14.0
func (a *Accumulator) Int32Field(measurement, field string) (int32, bool)
Int32Field returns the int32 value of the given measurement and field or false.
func (*Accumulator) Int64Field ¶ added in v1.14.0
func (a *Accumulator) Int64Field(measurement, field string) (int64, bool)
Int64Field returns the int64 value of the given measurement and field or false.
func (*Accumulator) IntField ¶ added in v1.14.0
func (a *Accumulator) IntField(measurement, field string) (int, bool)
IntField returns the int value of the given measurement and field or false.
func (*Accumulator) NDelivered ¶ added in v1.29.0
func (a *Accumulator) NDelivered() int
func (*Accumulator) NFields ¶ added in v0.10.0
func (a *Accumulator) NFields() int
NFields returns the total number of fields in the accumulator, across all measurements
func (*Accumulator) NMetrics ¶ added in v1.14.0
func (a *Accumulator) NMetrics() uint64
func (*Accumulator) SetDebug ¶ added in v0.2.0
func (a *Accumulator) SetDebug(debug bool)
func (*Accumulator) SetPrecision ¶ added in v1.14.0
func (*Accumulator) SetPrecision(time.Duration)
func (*Accumulator) StringField ¶ added in v1.14.0
func (a *Accumulator) StringField(measurement, field string) (string, bool)
StringField returns the string value of the given measurement and field or false.
func (*Accumulator) TagSetValue ¶ added in v1.14.0
func (a *Accumulator) TagSetValue(measurement, key string) string
func (*Accumulator) TagValue ¶ added in v1.14.0
func (a *Accumulator) TagValue(measurement, key string) string
func (*Accumulator) Uint64Field ¶ added in v1.14.0
func (a *Accumulator) Uint64Field(measurement, field string) (uint64, bool)
Uint64Field returns the int64 value of the given measurement and field or false.
func (*Accumulator) Wait ¶ added in v1.14.0
func (a *Accumulator) Wait(n int)
Wait waits for the given number of metrics to be added to the accumulator.
func (*Accumulator) WaitError ¶ added in v1.14.0
func (a *Accumulator) WaitError(n int)
WaitError waits for the given number of errors to be added to the accumulator.
func (*Accumulator) WithTracking ¶ added in v1.14.0
func (a *Accumulator) WithTracking(maxTracked int) telegraf.TrackingAccumulator
type CaptureLogger ¶ added in v1.19.0
type CaptureLogger struct {
Name string // Name is the plugin name, will be printed in the `[]`.
sync.Mutex
// contains filtered or unexported fields
}
CaptureLogger defines a logging structure for plugins.
func (*CaptureLogger) AddAttribute ¶ added in v1.32.0
func (*CaptureLogger) AddAttribute(string, interface{})
AddAttribute is not supported by the test-logger
func (*CaptureLogger) Clear ¶ added in v1.27.0
func (l *CaptureLogger) Clear()
func (*CaptureLogger) Debug ¶ added in v1.19.0
func (l *CaptureLogger) Debug(args ...interface{})
func (*CaptureLogger) Debugf ¶ added in v1.19.0
func (l *CaptureLogger) Debugf(format string, args ...interface{})
func (*CaptureLogger) Error ¶ added in v1.19.0
func (l *CaptureLogger) Error(args ...interface{})
func (*CaptureLogger) Errorf ¶ added in v1.19.0
func (l *CaptureLogger) Errorf(format string, args ...interface{})
func (*CaptureLogger) Errors ¶ added in v1.25.0
func (l *CaptureLogger) Errors() []string
func (*CaptureLogger) Info ¶ added in v1.19.0
func (l *CaptureLogger) Info(args ...interface{})
func (*CaptureLogger) Infof ¶ added in v1.19.0
func (l *CaptureLogger) Infof(format string, args ...interface{})
func (*CaptureLogger) LastError ¶ added in v1.19.0
func (l *CaptureLogger) LastError() string
func (*CaptureLogger) Level ¶ added in v1.31.0
func (*CaptureLogger) Level() telegraf.LogLevel
func (*CaptureLogger) Messages ¶ added in v1.27.0
func (l *CaptureLogger) Messages() []Entry
func (*CaptureLogger) NMessages ¶ added in v1.30.0
func (l *CaptureLogger) NMessages() int
func (*CaptureLogger) Trace ¶ added in v1.32.0
func (l *CaptureLogger) Trace(args ...interface{})
func (*CaptureLogger) Tracef ¶ added in v1.32.0
func (l *CaptureLogger) Tracef(format string, args ...interface{})
func (*CaptureLogger) Warn ¶ added in v1.19.0
func (l *CaptureLogger) Warn(args ...interface{})
func (*CaptureLogger) Warnf ¶ added in v1.19.0
func (l *CaptureLogger) Warnf(format string, args ...interface{})
func (*CaptureLogger) Warnings ¶ added in v1.27.0
func (l *CaptureLogger) Warnings() []string
type Container ¶ added in v1.23.0
type Container struct {
Entrypoint []string
Env map[string]string
Files map[string]string
HostAccessPorts []int
HostConfigModifier func(*container.HostConfig)
ExposedPorts []string
Cmd []string
Image string
Name string
Hostname string
Networks []string
WaitingFor wait.Strategy
Address string
Ports map[string]string
Logs TestLogConsumer
Quiet bool
// contains filtered or unexported fields
}
func (*Container) LookupMappedPorts ¶ added in v1.23.0
LookupMappedPorts creates a lookup table of exposed ports to mapped ports
type LineParser ¶ added in v1.18.0
type Logger ¶ added in v1.14.0
type Logger struct {
Name string // Name is the plugin name, will be printed in the `[]`.
LogLevel *telegraf.LogLevel
Quiet bool
}
func (Logger) AddAttribute ¶ added in v1.32.0
AddAttribute is not supported by the test-logger
type Metric ¶ added in v1.14.0
type Metric struct {
Measurement string
Tags map[string]string
Fields map[string]interface{}
Time time.Time
Type telegraf.ValueType
}
Metric defines a single point measurement
func ToTestMetric ¶ added in v1.29.0
type NopAccumulator ¶ added in v1.14.0
type NopAccumulator struct{}
NopAccumulator is used for benchmarking to isolate the plugin from the internal telegraf accumulator machinery.
func (*NopAccumulator) AddCounter ¶ added in v1.14.0
func (*NopAccumulator) AddError ¶ added in v1.14.0
func (*NopAccumulator) AddError(error)
func (*NopAccumulator) AddHistogram ¶ added in v1.14.0
func (*NopAccumulator) AddMetric ¶ added in v1.14.0
func (*NopAccumulator) AddMetric(telegraf.Metric)
func (*NopAccumulator) AddSummary ¶ added in v1.14.0
func (*NopAccumulator) SetPrecision ¶ added in v1.14.0
func (*NopAccumulator) SetPrecision(time.Duration)
func (*NopAccumulator) WithTracking ¶ added in v1.14.0
func (*NopAccumulator) WithTracking(int) telegraf.TrackingAccumulator
type TestLogConsumer ¶ added in v1.23.0
type TestLogConsumer struct {
Msgs []string
}
func (*TestLogConsumer) Accept ¶ added in v1.23.0
func (g *TestLogConsumer) Accept(l testcontainers.Log)