beats: github.com/elastic/beats/filebeat/channel Index | Files

package channel

import "github.com/elastic/beats/filebeat/channel"

Index

Package Files

connector.go factory.go interface.go outlet.go util.go

type Connector Uses

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

Connector creates an Outlet connecting the event publishing with some internal pipeline. type Connector func(*common.Config, *common.MapStrPointer) (Outleter, error)

type ConnectorFunc Uses

type ConnectorFunc func(*common.Config, beat.ClientConfig) (Outleter, error)

ConnectorFunc is an adapter for using ordinary functions as Connector.

func (ConnectorFunc) Connect Uses

func (fn ConnectorFunc) Connect(cfg *common.Config) (Outleter, error)

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

func (ConnectorFunc) ConnectWith Uses

func (fn ConnectorFunc) ConnectWith(cfg *common.Config, clientCfg beat.ClientConfig) (Outleter, error)

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

type Factory Uses

type Factory func(beat.Pipeline) Connector

Factory is used to create a new Outlet instance

type OutletFactory Uses

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

func NewOutletFactory Uses

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

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

func (*OutletFactory) Create Uses

func (f *OutletFactory) Create(p beat.Pipeline) Connector

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 Uses

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

Outleter is the outlet for an input

func CloseOnSignal Uses

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

CloseOnSignal closes the outlet, once the signal triggers.

func SubOutlet Uses

func SubOutlet(out Outleter) Outleter

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

Package channel imports 5 packages (graph) and is imported by 153 packages. Updated 2019-08-29. Refresh now. Tools for package owners.