inputs

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2015 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InputPluginNames = []string{
	"sniffer",
	"udpjson",
	"gobeacon",
}

Functions

This section is empty.

Types

type Input

type Input int
const (
	SnifferInput Input = iota
	UdpjsonInput
	GoBeaconInput
)

func (Input) IsInList

func (input Input) IsInList(lst []string) bool

Check if the input name is in a list of names.

func (Input) String

func (input Input) String() string

type InputPlugin

type InputPlugin interface {
	Init(test_mode bool, events chan common.MapStr) error
	Run() error
	Stop() error
	Close() error
	IsAlive() bool
}

The InputPlugin interface needs to be implemented by all the input plugins.

type InputsList

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

Contains a list of the available input plugins.

var Inputs InputsList

func (InputsList) AreAllAlive

func (inputs InputsList) AreAllAlive() bool

func (InputsList) CloseAll

func (inputs InputsList) CloseAll() error

CloseAll calls the Close methods of all registered inputs. All inputs Close() methods are called even when there are errors. The error messages are concatenated together.

func (InputsList) Get

func (inputs InputsList) Get(input Input) InputPlugin

func (InputsList) Register

func (inputs InputsList) Register(input Input, plugin InputPlugin)

func (InputsList) Registered

func (inputs InputsList) Registered() map[Input]InputPlugin

func (InputsList) StopAll

func (inputs InputsList) StopAll()

StopAll calls the Stop methods of all registered inputs

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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