prospector

package
v6.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Plugin

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

func Register

func Register(name string, factory Factory) error

Types

type Context

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

type Factory

type Factory func(config *common.Config, outletFactory channel.Factory, context Context) (Prospectorer, error)

func GetFactory

func GetFactory(name string) (Factory, error)

type Prospector

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

Prospector contains the prospector

func New

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

NewProspector instantiates a new prospector

func (*Prospector) Run

func (p *Prospector) Run()

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

func (*Prospector) Start

func (p *Prospector) Start()

Start starts the prospector

func (*Prospector) Stop

func (p *Prospector) Stop()

Stop stops the prospector and with it all harvesters

func (*Prospector) String

func (p *Prospector) String() string

type Prospectorer

type Prospectorer interface {
	Run()
	Stop()
	Wait()
}

Prospectorer is the interface common to all prospectors

type RunnerFactory

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

RunnerFactory is a factory for registrars

func NewRunnerFactory

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

NewRunnerFactory instantiates a new RunnerFactory

func (*RunnerFactory) Create

Create creates a prospector based on a config

Directories

Path Synopsis
Package log harvests different inputs for new information.
Package log harvests different inputs for new information.
Package redis package contains prospector and harvester to read the redis slow log
Package redis package contains prospector and harvester to read the redis slow log

Jump to

Keyboard shortcuts

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