beat

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2016 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Beat

type Beat struct {
	Name      string
	Version   string
	Config    *BeatConfig
	BT        Beater
	Publisher *publisher.PublisherType
	Events    publisher.Client
}

Basic beat information

func NewBeat

func NewBeat(name string, version string, bt Beater) *Beat

Initiates a new beat object

func Run

func Run(name string, version string, bt Beater) *Beat

Initiates and runs a new beat object

func (*Beat) CommandLineSetup

func (beat *Beat) CommandLineSetup()

Reads and parses the default command line params To set additional cmd line args use the beat.CmdLine type before calling the function

func (*Beat) LoadConfig

func (b *Beat) LoadConfig()

LoadConfig inits the config file and reads the default config information into Beat.Config. It exists the processes in case of errors.

func (*Beat) Run

func (b *Beat) Run()

Run calls the beater Setup and Run methods. In case of errors during the setup phase, it exits the process.

func (*Beat) Stop

func (beat *Beat) Stop()

Stop calls the beater Stop action.

type BeatConfig

type BeatConfig struct {
	Output  map[string]outputs.MothershipConfig
	Logging logp.Logging
	Shipper publisher.ShipperConfig
}

Basic configuration of every beat

type Beater

type Beater interface {
	Config(*Beat) error
	Setup(*Beat) error
	Run(*Beat) error
	Cleanup(*Beat) error
	Stop()
}

Beater interface that every beat must use

type FlagsHandler

type FlagsHandler interface {
	HandleFlags(*Beat)
}

FlagsHandler (optional) Beater extension for handling flags input on startup. The HandleFlags callback will be called after parsing the command line arguments and handling the '--help' or '--version' flags.

Jump to

Keyboard shortcuts

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