config

package
v0.0.39 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// types
	KubernetesSourceType      = "kubernetes_logs"
	BlackholeSinkType         = "blackhole"
	InternalMetricsSourceType = "internal_metrics"
	InternalMetricsSinkType   = "prometheus_exporter"

	// default names
	DefaultSourceName                = "defaultSource"
	DefaultSinkName                  = "defaultSink"
	DefaultInternalMetricsSourceName = "internalMetricsSource"
	DefaultInternalMetricsSinkName   = "internalMetricsSink"
)

Variables

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

Functions

func BuildByteConfig

func BuildByteConfig(vaCtrl *vectoragent.Controller, pipelines ...pipeline.Pipeline) ([]byte, error)

Types

type ApiSpec

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

type PipelineConfig

type PipelineConfig struct {
	Sources    map[string]*Source    `yaml:"sources"`
	Transforms map[string]*Transform `yaml:"transforms"`
	Sinks      map[string]*Sink      `yaml:"sinks"`
}

type Sink

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

type Source

type Source struct {
	Name                        string                 `yaml:"-"`
	Type                        string                 `mapstructure:"type" yaml:"type"`
	ExtraNamespaceLabelSelector string                 `mapstructure:"extra_namespace_label_selector" yaml:"extra_namespace_label_selector,omitempty"`
	ExtraLabelSelector          string                 `mapstructure:"extra_label_selector" yaml:"extra_label_selector,omitempty"`
	ExtraFieldSelector          string                 `mapstructure:"extra_field_selector" yaml:"extra_field_selector,omitempty"`
	UseApiServerCache           bool                   `mapstructure:"use_apiserver_cache" yaml:"use_apiserver_cache,omitempty"`
	Options                     map[string]interface{} `mapstructure:",remain" yaml:",inline,omitempty"`
}

type Transform

type Transform struct {
	Name    string                 `yaml:"-"`
	Type    string                 `mapstructure:"type" yaml:"type"`
	Inputs  []string               `mapstructure:"inputs" yaml:"inputs"`
	Options map[string]interface{} `mapstructure:",remain" yaml:",inline,omitempty"`
}

type VectorConfig

type VectorConfig struct {
	DataDir        string   `yaml:"data_dir"`
	Api            *ApiSpec `yaml:"api"`
	PipelineConfig `yaml:",inline"`
}

func BuildConfig

func BuildConfig(vaCtrl *vectoragent.Controller, pipelines ...pipeline.Pipeline) (*VectorConfig, error)

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