channel

package
v0.0.0-...-170c358 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunnerFactoryWithCommonInputSettings

func RunnerFactoryWithCommonInputSettings(info beat.Info, f cfgfile.RunnerFactory) cfgfile.RunnerFactory

RunnerFactoryWithCommonInputSettings wraps a runner factory, such that all runners created by this factory have the same processing capabilities and related configuration file settings.

Common settings ensured by this factory wrapper:

  • *fields*: common fields to be added to the pipeline
  • *fields_under_root*: select at which level to store the fields
  • *tags*: add additional tags to the events
  • *processors*: list of local processors to be added to the processing pipeline
  • *keep_null*: keep or remove 'null' from events to be published
  • *_module_name* (hidden setting): Add fields describing the module name
  • *_ fileset_name* (hiddrn setting):
  • *pipeline*: Configure the ES Ingest Node pipeline name to be used for events from this input
  • *index*: Configure the index name for events to be collected from this input
  • *type*: implicit event type
  • *service.type*: implicit event type

Types

type Connector

type Connector interface {
	Connect(*conf.C) (Outleter, error)
	ConnectWith(*conf.C, beat.ClientConfig) (Outleter, error)
}

Connector creates an Outlet connecting the event publishing with some internal pipeline. type Connector func(*conf.C, *mapstr.Pointer) (Outleter, error)

type ConnectorFunc

type ConnectorFunc func(*conf.C, beat.ClientConfig) (Outleter, error)

ConnectorFunc is an adapter for using ordinary functions as Connector.

func (ConnectorFunc) Connect

func (fn ConnectorFunc) Connect(cfg *conf.C) (Outleter, error)

Connect passes the cfg and the zero value of beat.ClientConfig to the underlying function.

func (ConnectorFunc) ConnectWith

func (fn ConnectorFunc) ConnectWith(cfg *conf.C, clientCfg beat.ClientConfig) (Outleter, error)

ConnectWith passes the configuration and the pipeline connection setting to the underlying function.

type Factory

type Factory func(beat.PipelineConnector) Connector

Factory is used to create a new Outlet instance

type OutletFactory

type OutletFactory struct {
	// contains filtered or unexported fields
}

func NewOutletFactory

func NewOutletFactory(done <-chan struct{}) *OutletFactory

NewOutletFactory creates a new outlet factory for connecting an input to the publisher pipeline.

func (*OutletFactory) Create

Create builds a new Outleter, while applying common input settings. Inputs and all harvesters use the same pipeline client instance. This guarantees ordering between events as required by the registrar for file.State updates

type Outleter

type Outleter interface {
	Close() error
	Done() <-chan struct{}
	OnEvent(beat.Event) bool
}

Outleter is the outlet for an input

func CloseOnSignal

func CloseOnSignal(outlet Outleter, sig <-chan struct{}) Outleter

CloseOnSignal closes the outlet, once the signal triggers.

func SubOutlet

func SubOutlet(out Outleter) Outleter

SubOutlet create a sub-outlet, which can be closed individually, without closing the underlying outlet.

Jump to

Keyboard shortcuts

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