proxy

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RequestAllMetricsFilter = "/*"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector interface {
	RequestCollect(id string) <-chan types.CollectChunk
	LoadTask(id string, config []byte, selectors []string) error
	UnloadTask(id string) error
	CustomInfo(id string) ([]byte, error)
}

type ContextManager

type ContextManager struct {
	*commonProxy.ContextManager

	ExampleConfig yaml.Node // example config
	// contains filtered or unexported fields
}

func NewContextManager

func NewContextManager(ctx context.Context, collector types.Collector, statsController stats.Controller) *ContextManager

func (*ContextManager) Context

func (cm *ContextManager) Context() context.Context

func (*ContextManager) CustomInfo

func (cm *ContextManager) CustomInfo(id string) ([]byte, error)

func (*ContextManager) DefineExampleConfig

func (cm *ContextManager) DefineExampleConfig(cfg string) error

func (*ContextManager) DefineGroup

func (cm *ContextManager) DefineGroup(name string, description string)

Define description for dynamic element

func (*ContextManager) DefineMetric

func (cm *ContextManager) DefineMetric(ns string, unit string, isDefault bool, description string)

func (*ContextManager) ListDefaultMetrics

func (cm *ContextManager) ListDefaultMetrics() []string

func (*ContextManager) LoadTask

func (cm *ContextManager) LoadTask(id string, rawConfig []byte, mtsFilter []string) error

func (*ContextManager) RequestCollect

func (cm *ContextManager) RequestCollect(id string) <-chan types.CollectChunk

func (*ContextManager) RequestPluginDefinition

func (cm *ContextManager) RequestPluginDefinition()

func (*ContextManager) UnloadTask

func (cm *ContextManager) UnloadTask(id string) error

type PluginContext

type PluginContext struct {
	*commonProxy.Context
	// contains filtered or unexported fields
}

func NewPluginContext

func NewPluginContext(ctxManager *ContextManager, taskID string, rawConfig []byte) (*PluginContext, error)

func (*PluginContext) AddMetric

func (pc *PluginContext) AddMetric(ns string, v interface{}, modifiers ...plugin.MetricModifier) error

func (*PluginContext) AlwaysApply

func (pc *PluginContext) AlwaysApply(namespaceSelector string, modifiers ...plugin.MetricModifier) (plugin.Dismisser, error)

func (*PluginContext) ClearCollectorSession

func (pc *PluginContext) ClearCollectorSession()

func (*PluginContext) DismissAllModifiers

func (pc *PluginContext) DismissAllModifiers()

func (*PluginContext) Metrics

func (pc *PluginContext) Metrics(clear bool) []*types.Metric

func (*PluginContext) RequestedMetrics

func (pc *PluginContext) RequestedMetrics() []string

func (*PluginContext) ShouldProcess

func (pc *PluginContext) ShouldProcess(ns string) bool

func (*PluginContext) TaskID

func (pc *PluginContext) TaskID() string

Jump to

Keyboard shortcuts

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