elastic

package
v2.0.0-...-675b67f Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ElasticOutput

type ElasticOutput struct {
	helper.OutputOperator
	// 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) Process

func (e *ElasticOutput) Process(ctx context.Context, entry *entry.Entry) error

Process adds an entry to the outputs buffer

func (*ElasticOutput) Start

func (e *ElasticOutput) Start(_ operator.Persister) error

Start signals to the ElasticOutput to begin flushing

func (*ElasticOutput) Stop

func (e *ElasticOutput) Stop() error

Stop tells the ElasticOutput to stop gracefully

type ElasticOutputConfig

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

	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

NewElasticOutputConfig creates a new elastic output config with default values

func (ElasticOutputConfig) Build

Build will build an elasticsearch output operator.

Jump to

Keyboard shortcuts

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