output

package
v0.9.14 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Stdout io.Writer = os.Stdout

Stdout is a global handle to standard output

Functions

This section is empty.

Types

type DropOutput

type DropOutput struct {
	helper.OutputOperator
}

DropOutput is an operator that consumes and ignores incoming entries.

func (*DropOutput) Process

func (p *DropOutput) Process(ctx context.Context, entry *entry.Entry) error

Process will drop the incoming entry.

type DropOutputConfig

type DropOutputConfig struct {
	helper.OutputConfig `yaml:",inline"`
}

DropOutputConfig is the configuration of a drop output operator.

func NewDropOutputConfig

func NewDropOutputConfig(operatorID string) *DropOutputConfig

func (DropOutputConfig) Build

Build will build a drop output operator.

type ElasticOutput

type ElasticOutput struct {
	helper.OutputOperator
	buffer.Buffer
	// contains filtered or unexported fields
}

ElasticOutput is an operator that sends entries to elasticsearch.

func (*ElasticOutput) FindID

func (e *ElasticOutput) FindID(entry *entry.Entry) (string, error)

FindID will find the id that will represent an entry in elasticsearch.

func (*ElasticOutput) FindIndex

func (e *ElasticOutput) FindIndex(entry *entry.Entry) (string, error)

FindIndex will find an index that will represent an entry in elasticsearch.

func (*ElasticOutput) ProcessMulti

func (e *ElasticOutput) ProcessMulti(ctx context.Context, entries []*entry.Entry) error

ProcessMulti will send entries to elasticsearch.

type ElasticOutputConfig

type ElasticOutputConfig struct {
	helper.OutputConfig `yaml:",inline"`
	BufferConfig        buffer.Config `json:"buffer" yaml:"buffer"`

	Addresses  []string     `json:"addresses"             yaml:"addresses,flow"`
	Username   string       `json:"username"              yaml:"username"`
	Password   string       `json:"password"              yaml:"password"`
	CloudID    string       `json:"cloud_id"              yaml:"cloud_id"`
	APIKey     string       `json:"api_key"               yaml:"api_key"`
	IndexField *entry.Field `json:"index_field,omitempty" yaml:"index_field,omitempty"`
	IDField    *entry.Field `json:"id_field,omitempty"    yaml:"id_field,omitempty"`
}

ElasticOutputConfig is the configuration of an elasticsearch output operator.

func NewElasticOutputConfig

func NewElasticOutputConfig(operatorID string) *ElasticOutputConfig

func (ElasticOutputConfig) Build

Build will build an elasticsearch output operator.

type FileOutput

type FileOutput struct {
	helper.OutputOperator
	// contains filtered or unexported fields
}

FileOutput is an operator that writes logs to a file.

func (*FileOutput) Process

func (fo *FileOutput) Process(ctx context.Context, entry *entry.Entry) error

Process will write an entry to the output file.

func (*FileOutput) Start

func (fo *FileOutput) Start() error

Start will open the output file.

func (*FileOutput) Stop

func (fo *FileOutput) Stop() error

Stop will close the output file.

type FileOutputConfig

type FileOutputConfig struct {
	helper.OutputConfig `yaml:",inline"`

	Path   string `json:"path" yaml:"path"`
	Format string `json:"format,omitempty" path:"format,omitempty"`
}

FileOutputConfig is the configuration of a file output operatorn.

func NewFileOutputConfig

func NewFileOutputConfig(operatorID string) *FileOutputConfig

func (FileOutputConfig) Build

Build will build a file output operator.

type StdoutConfig

type StdoutConfig struct {
	helper.OutputConfig `yaml:",inline"`
}

StdoutConfig is the configuration of the Stdout operator

func NewStdoutConfig

func NewStdoutConfig(operatorID string) *StdoutConfig

func (StdoutConfig) Build

Build will build a stdout operator.

type StdoutOperator

type StdoutOperator struct {
	helper.OutputOperator
	// contains filtered or unexported fields
}

StdoutOperator is an operator that logs entries using stdout.

func (*StdoutOperator) Process

func (o *StdoutOperator) Process(ctx context.Context, entry *entry.Entry) error

Process will log entries received.

Directories

Path Synopsis
elastic module
file module
newrelic module
otlp module
stdout module

Jump to

Keyboard shortcuts

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