beats: Index | Files | Directories

package input

import ""


Package Files

config.go input.go plugin.go registry.go runnerfactory.go

func Plugin Uses

func Plugin(
    module string,
    factory Factory,
) map[string][]interface{}

func Register Uses

func Register(name string, factory Factory) error

type Context Uses

type Context struct {
    States        []file.State
    Done          chan struct{}
    BeatDone      chan struct{}
    DynamicFields *common.MapStrPointer
    Meta          map[string]string

type Factory Uses

type Factory = func(config *common.Config, connector channel.Connector, context Context) (Input, error)

Factory is used to register functions creating new Input instances.

func GetFactory Uses

func GetFactory(name string) (Factory, error)

type Input Uses

type Input interface {

Input is the interface common to all input

type Runner Uses

type Runner struct {
    ID   uint64
    Once bool
    // contains filtered or unexported fields

Runner encapsulate the lifecycle of the input

func New Uses

func New(
    conf *common.Config,
    connector channel.Connector,
    beatDone chan struct{},
    states []file.State,
    dynFields *common.MapStrPointer,
) (*Runner, error)

New instantiates a new Runner

func (*Runner) Run Uses

func (p *Runner) Run()

Run starts scanning through all the file paths and fetch the related files. Start a harvester for each file

func (*Runner) Start Uses

func (p *Runner) Start()

Start starts the input

func (*Runner) Stop Uses

func (p *Runner) Stop()

Stop stops the input and with it all harvesters

func (*Runner) String Uses

func (p *Runner) String() string

type RunnerFactory Uses

type RunnerFactory struct {
    // contains filtered or unexported fields

RunnerFactory is a factory for registrars

func NewRunnerFactory Uses

func NewRunnerFactory(outlet channel.Factory, registrar *registrar.Registrar, beatDone chan struct{}) *RunnerFactory

NewRunnerFactory instantiates a new RunnerFactory

func (*RunnerFactory) Create Uses

func (r *RunnerFactory) Create(
    pipeline beat.Pipeline,
    c *common.Config,
    meta *common.MapStrPointer,
) (cfgfile.Runner, error)

Create creates a input based on a config


logPackage log harvests different inputs for new information.
redisPackage redis package contains input and harvester to read the redis slow log
syslogCode generated by ragel DO NOT EDIT.

Package input imports 16 packages (graph) and is imported by 480 packages. Updated 2020-02-17. Refresh now. Tools for package owners.