beats: Index | Files

package harvester

import ""


Package Files

forwarder.go harvester.go registry.go source.go util.go


const (
    LogType       = "log"
    StdinType     = "stdin"
    RedisType     = "redis"
    UdpType       = "udp"
    DockerType    = "docker"
    ContainerType = "container"

Contains available input types

func MatchAny Uses

func MatchAny(matchers []match.Matcher, text string) bool

MatchAny checks if the text matches any of the regular expressions

type Forwarder Uses

type Forwarder struct {
    Outlet Outlet

Forwarder contains shared options between all harvesters needed to forward events

func NewForwarder Uses

func NewForwarder(outlet Outlet) *Forwarder

NewForwarder creates a new forwarder instances and initialises processors if configured

func (*Forwarder) Send Uses

func (f *Forwarder) Send(event beat.Event) error

Send updates the input state and sends the event to the spooler All state updates done by the input itself are synchronous to make sure no states are overwritten

type ForwarderConfig Uses

type ForwarderConfig struct {
    Type string `config:"type"`

ForwarderConfig contains all config options shared by all harvesters

type Harvester Uses

type Harvester interface {
    ID() uuid.UUID
    Run() error

Harvester contains all methods which must be supported by each harvester so the registry can be used by the input

type Outlet Uses

type Outlet interface {
    OnEvent(data beat.Event) bool

Outlet interface is used for forwarding events

type Registry Uses

type Registry struct {
    // contains filtered or unexported fields

Registry struct manages (start / stop) a list of harvesters

func NewRegistry Uses

func NewRegistry() *Registry

NewRegistry creates a new registry object

func (*Registry) Len Uses

func (r *Registry) Len() uint64

Len returns the current number of harvesters in the registry

func (*Registry) Start Uses

func (r *Registry) Start(h Harvester) error

Start starts the given harvester and add its to the registry

func (*Registry) Stop Uses

func (r *Registry) Stop()

Stop stops all harvesters in the registry

func (*Registry) WaitForCompletion Uses

func (r *Registry) WaitForCompletion()

WaitForCompletion can be used to wait until all harvesters are stopped

type Source Uses

type Source interface {
    Name() string
    Removed() bool // check if source has been removed
    Stat() (os.FileInfo, error)
    Continuable() bool // can we continue processing after EOF?
    HasState() bool    // does this source have a state?

Package harvester imports 8 packages (graph) and is imported by 254 packages. Updated 2019-08-15. Refresh now. Tools for package owners.