v2

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const LatestVersion = "2.2"
View Source
const MajorVersion = "2"

Variables

View Source
var Changelog = internal.Changelog{
	"2.0": {},
	"2.1": {
		{
			Field:      "pipelines.*.processors.*.condition",
			ChangeType: internal.FieldIntroduced,
			Message:    "field condition was introduced in version 2.1, please update the pipeline config version",
		},
		{
			Field:      "pipelines.*.connectors.*.processors.*.condition",
			ChangeType: internal.FieldIntroduced,
			Message:    "field condition was introduced in version 2.1, please update the pipeline config version",
		},
	},
	"2.2": {
		{
			Field:      "pipelines.*.processors.*.plugin",
			ChangeType: internal.FieldIntroduced,
			Message:    "field plugin was introduced in version 2.2, please update the pipeline config version",
		},
		{
			Field:      "pipelines.*.connectors.*.processors.*.plugin",
			ChangeType: internal.FieldIntroduced,
			Message:    "field plugin was introduced in version 2.2, please update the pipeline config version",
		},
		{
			Field:      "pipelines.*.processors.*.type",
			ChangeType: internal.FieldDeprecated,
			Message:    "please use field 'plugin' (introduced in version 2.2)",
		},
		{
			Field:      "pipelines.*.connectors.*.processors.*.type",
			ChangeType: internal.FieldDeprecated,
			Message:    "please use field 'plugin' (introduced in version 2.2)",
		},
	},
}

Changelog should be adjusted every time we change the pipeline config and add a new config version. Based on the changelog the parser will output warnings.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Version   string     `yaml:"version" json:"version"`
	Pipelines []Pipeline `yaml:"pipelines" json:"pipelines"`
}

func FromConfig added in v0.8.1

func FromConfig(pipelines []config.Pipeline) Configuration

func (Configuration) ToConfig

func (c Configuration) ToConfig() []config.Pipeline

type Connector

type Connector struct {
	ID         string            `yaml:"id" json:"id"`
	Type       string            `yaml:"type" json:"type"`
	Plugin     string            `yaml:"plugin" json:"plugin"`
	Name       string            `yaml:"name" json:"name"`
	Settings   map[string]string `yaml:"settings" json:"settings"`
	Processors []Processor       `yaml:"processors" json:"processors"`
}

func (Connector) ToConfig

func (c Connector) ToConfig() config.Connector

type DLQ

type DLQ struct {
	Plugin              string            `yaml:"plugin" json:"plugin"`
	Settings            map[string]string `yaml:"settings" json:"settings"`
	WindowSize          *int              `yaml:"window-size" json:"window-size"`
	WindowNackThreshold *int              `yaml:"window-nack-threshold" json:"window-nack-threshold"`
}

func (DLQ) ToConfig

func (p DLQ) ToConfig() config.DLQ

type Pipeline

type Pipeline struct {
	ID          string      `yaml:"id" json:"id"`
	Status      string      `yaml:"status" json:"status"`
	Name        string      `yaml:"name" json:"name"`
	Description string      `yaml:"description" json:"description"`
	Connectors  []Connector `yaml:"connectors" json:"connectors"`
	Processors  []Processor `yaml:"processors" json:"processors"`
	DLQ         DLQ         `yaml:"dead-letter-queue" json:"dead-letter-queue"`
}

func (Pipeline) ToConfig

func (p Pipeline) ToConfig() config.Pipeline

type Processor

type Processor struct {
	ID        string            `yaml:"id" json:"id"`
	Type      string            `yaml:"type" json:"type"`
	Plugin    string            `yaml:"plugin" json:"plugin"`
	Condition string            `yaml:"condition" json:"condition"`
	Settings  map[string]string `yaml:"settings" json:"settings"`
	Workers   int               `yaml:"workers" json:"workers"`
}

func (Processor) ToConfig

func (p Processor) ToConfig() config.Processor

Jump to

Keyboard shortcuts

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