channel

package
v0.0.0-...-99b9a3e Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

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

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{},
	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.

Jump to

Keyboard shortcuts

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