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
- type Collector
- type ContextManager
- func (cm *ContextManager) AllowUndefinedMetrics()
- func (cm *ContextManager) AllowValuesAtAnyNamespaceLevel()
- func (cm *ContextManager) Context() context.Context
- func (cm *ContextManager) CustomInfo(id string) ([]byte, error)
- func (cm *ContextManager) DefineGroup(name string, description string)
- func (cm *ContextManager) DefineMetric(ns string, unit string, isDefault bool, description string)
- func (cm *ContextManager) ListDefaultMetrics() []string
- func (cm *ContextManager) LoadTask(id string, rawConfig []byte, mtsFilter []string) error
- func (cm *ContextManager) RequestCollect(id string) <-chan types.CollectChunk
- func (cm *ContextManager) RequestPluginDefinition()
- func (cm *ContextManager) SetGlobalMetricPrefix(prefix string, removePrefixFromOutput bool) error
- func (cm *ContextManager) UnloadTask(id string) error
- type PluginContext
- func (pc *PluginContext) AddMetric(ns string, v interface{}, modifiers ...plugin.MetricModifier) error
- func (pc *PluginContext) AlwaysApply(namespaceSelector string, modifiers ...plugin.MetricModifier) (plugin.Dismisser, error)
- func (pc *PluginContext) ClearCollectorSession()
- func (pc *PluginContext) DismissAllModifiers()
- func (pc *PluginContext) Metrics(clear bool) []*types.Metric
- func (pc *PluginContext) RequestedMetrics() []string
- func (pc *PluginContext) ShouldProcess(ns string) bool
- func (pc *PluginContext) TaskID() string
Constants ¶
View Source
const (
RequestAllMetricsFilter = "/*"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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) RequestedMetrics ¶
func (pc *PluginContext) RequestedMetrics() []string
func (*PluginContext) ShouldProcess ¶
func (pc *PluginContext) ShouldProcess(ns string) bool
func (*PluginContext) TaskID ¶
func (pc *PluginContext) TaskID() string
Click to show internal directories.
Click to hide internal directories.