channel

package
v6.0.0-rc2+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2017 License: Apache-2.0 Imports: 5 Imported by: 1,721

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OutletFactory

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

func NewOutletFactory

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

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

func (*OutletFactory) Create

func (f *OutletFactory) Create(cfg *common.Config) (Outleter, error)

Create builds a new Outleter, while applying common prospector settings. Prospectors 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
	OnEvent(data *util.Data) bool
}

Outleter is the outlet for a prospector

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.

type OutleterFactory

type OutleterFactory func(*common.Config) (Outleter, error)

OutletFactory is used to create a new Outlet instance

Jump to

Keyboard shortcuts

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