mock

package
v2.6.3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CollectorDefinition

type CollectorDefinition struct {
	Definition
}

func (*CollectorDefinition) AllowUndefinedMetrics added in v2.1.0

func (m *CollectorDefinition) AllowUndefinedMetrics()

func (*CollectorDefinition) AllowValuesAtAnyNamespaceLevel added in v2.1.0

func (m *CollectorDefinition) AllowValuesAtAnyNamespaceLevel()

func (*CollectorDefinition) DefineExampleConfig

func (m *CollectorDefinition) DefineExampleConfig(cfg string) error

func (*CollectorDefinition) DefineGroup

func (m *CollectorDefinition) DefineGroup(name string, description string)

func (*CollectorDefinition) DefineMetric

func (m *CollectorDefinition) DefineMetric(namespace string, unit string, isDefault bool, description string)

func (*CollectorDefinition) SetGlobalMetricPrefix added in v2.6.1

func (m *CollectorDefinition) SetGlobalMetricPrefix(prefix string, removePrefixFromOutput bool) error

type Context

type Context struct {
	mock.Mock
}

func (*Context) AddMetric

func (m *Context) AddMetric(ns string, value interface{}, modifiers ...plugin.MetricModifier) error

func (*Context) AddWarning

func (m *Context) AddWarning(msg string)

func (*Context) AlwaysApply

func (m *Context) AlwaysApply(namespaceSelector string, modifiers ...plugin.MetricModifier) (plugin.Dismisser, error)

func (*Context) ConfigKeys

func (m *Context) ConfigKeys() []string

func (*Context) ConfigValue

func (m *Context) ConfigValue(key string) (string, bool)

func (*Context) Count

func (m *Context) Count() int

func (*Context) DismissAllModifiers

func (m *Context) DismissAllModifiers()

func (*Context) Done

func (m *Context) Done() <-chan struct{}

func (*Context) IsDone

func (m *Context) IsDone() bool

func (*Context) ListAllMetrics

func (m *Context) ListAllMetrics() []plugin.Metric

publisher context

func (*Context) Load

func (m *Context) Load(key string) (interface{}, bool)

func (*Context) LoadTo

func (m *Context) LoadTo(key string, dest interface{}) error

func (*Context) Logger

func (m *Context) Logger() logrus.FieldLogger

func (*Context) RawConfig

func (m *Context) RawConfig() []byte

func (*Context) RawContext added in v2.0.8

func (m *Context) RawContext() context.Context

func (*Context) RequestedMetrics

func (m *Context) RequestedMetrics() []string

func (*Context) ShouldProcess

func (m *Context) ShouldProcess(ns string) bool

func (*Context) Store

func (m *Context) Store(key string, value interface{})

type Definition

type Definition struct {
	mock.Mock
}

func (*Definition) DefineInstancesLimit

func (m *Definition) DefineInstancesLimit(limit int) error

func (*Definition) DefineTasksPerInstanceLimit

func (m *Definition) DefineTasksPerInstanceLimit(limit int) error

Jump to

Keyboard shortcuts

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