beat

package
v1.0.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2015 License: Apache-2.0 Imports: 9 Imported by: 0

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
	Events  publisher.Client
}

Basic beat information

func NewBeat

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

Initiates 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

Jump to

Keyboard shortcuts

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