proxy

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: 16 Imported by: 0

Documentation

Overview

Package proxy : 1) Manages context for different task created for the same plugin 2) Serves as an entry point for any "controller" (like. Rpc)

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
	// contains filtered or unexported fields
}

func NewContextManager

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

func (*ContextManager) AllowUndefinedMetrics added in v2.1.0

func (cm *ContextManager) AllowUndefinedMetrics()

func (*ContextManager) AllowValuesAtAnyNamespaceLevel added in v2.1.0

func (cm *ContextManager) AllowValuesAtAnyNamespaceLevel()

func (*ContextManager) Context

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

func (*ContextManager) CustomInfo

func (cm *ContextManager) CustomInfo(id string) ([]byte, 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) SetGlobalMetricPrefix added in v2.4.0

func (cm *ContextManager) SetGlobalMetricPrefix(prefix string, removePrefixFromOutput bool) error

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