beat

package
v1.0.0-beta3 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 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
	CmdLine *flag.FlagSet
	Config  BeatConfig
	BT      Beater
}

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()

Inits the config file and reads the default config information into Beat.Config This is Output, Logging and Shipper config params

func (*Beat) Run

func (b *Beat) Run()

internal libbeat function that calls beater Run method

func (*Beat) Stop

func (beat *Beat) Stop()

Stops the beat and 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