config

package
v0.0.22 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KubernetesSourceType          = "kubernetes_logs"
	BlackholeSinkType             = "blackhole"
	InternalMetricsSourceType     = "internal_metrics"
	InternalMetricsSinkType       = "prometheus_exporter"
	OptimizedKubernetesSourceName = "optimizedKubernetesSource"
	FilterTransformType           = "filter"
	DefaultSourceName             = "defaultSource"
	PodSelectorType               = "pod_labels"
	NamespaceSelectorType         = "ns_labels"
	OptimizationConditionType     = "vrl"
)

Variables

View Source
var (
	PipelineTypeError  error = errors.New("type kubernetes_logs only allowed")
	PipelineScopeError error = errors.New("logs from external namespace not allowed")
)

Functions

func Mapper added in v0.0.2

func Mapper(c ConfigComponent) (map[string]interface{}, error)

Types

type ApiSpec added in v0.0.14

type ApiSpec struct {
	Address    string `json:"address,omitempty"`
	Enabled    bool   `json:"enabled,omitempty"`
	Playground bool   `json:"playground,omitempty"`
}

type Builder added in v0.0.2

type Builder struct {
	Name string

	Pipelines []pipeline.Pipeline
	// contains filtered or unexported fields
}

func NewBuilder added in v0.0.2

func NewBuilder(vaCtrl *vectoragent.Controller, pipelines ...pipeline.Pipeline) *Builder

func (*Builder) GetByteConfig added in v0.0.2

func (b *Builder) GetByteConfig() ([]byte, error)

type ConfigComponent added in v0.0.2

type ConfigComponent interface {
	GetOptions() map[string]interface{}
}

type Sink added in v0.0.2

type Sink struct {
	Name    string
	Type    string                 `mapper:"type"`
	Inputs  []string               `mapper:"inputs"`
	Options map[string]interface{} `mapstructure:",remain"`
}

func (Sink) GetOptions added in v0.0.2

func (t Sink) GetOptions() map[string]interface{}

type Source added in v0.0.2

type Source struct {
	Name                        string
	Type                        string                 `mapper:"type"`
	ExtraNamespaceLabelSelector string                 `mapstructure:"extra_namespace_label_selector" mapper:"extra_namespace_label_selector,omitempty"`
	ExtraLabelSelector          string                 `mapstructure:"extra_label_selector" mapper:"extra_label_selector,omitempty"`
	ExtraFieldSelector          string                 `mapstructure:"extra_field_selector" mapper:"extra_field_selector,omitempty"`
	Options                     map[string]interface{} `mapstructure:",remain"`
}

func (Source) GetOptions added in v0.0.2

func (t Source) GetOptions() map[string]interface{}

type Transform added in v0.0.2

type Transform struct {
	Name      string
	Type      string                 `mapper:"type"`
	Inputs    []string               `mapper:"inputs"`
	Condition interface{}            `mapper:"condition,omitempty"`
	Options   map[string]interface{} `mapstructure:",remain"`
}

func (Transform) GetOptions added in v0.0.2

func (t Transform) GetOptions() map[string]interface{}

type VectorConfig added in v0.0.2

type VectorConfig struct {
	DataDir    string       `mapstructure:"data_dir"`
	Api        *ApiSpec     `mapstructure:"api"`
	Sources    []*Source    `mapstructure:"sources"`
	Transforms []*Transform `mapstructure:"transforms"`
	Sinks      []*Sink      `mapstructure:"sinks"`
}

func New

func New(vector *vectorv1alpha1.Vector) *VectorConfig

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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