config

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func Mapper added in v0.0.2

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

func ReconcileConfig added in v0.0.2

func ReconcileConfig(ctx context.Context, client client.Client, p pipeline.Pipeline, vaCtrl *vectoragent.Controller) error

Types

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)

func (*Builder) GetByteConfigWithValidate added in v0.0.2

func (b *Builder) GetByteConfigWithValidate() ([]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"`
	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"`
	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        *vectorv1alpha1.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