core

package
v0.0.0-...-5ea8946 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	METRIC_PROC_IN = iota + 1
	METRIC_PROC_OUT
	METRIC_PACKET_DROP
	METRIC_CONNECTION_TRANSIT
)

Variables

This section is empty.

Functions

func Log

func Log() *logrus.Logger

func LogWithEvent

func LogWithEvent(e processors.IPacket) *logrus.Entry

func NewAgent

func NewAgent(conf config.Agent) (*agent, error)

func NewMemory

func NewMemory(location string) *memory

func NewPacket

func NewPacket(message string, fields map[string]interface{}) processors.IPacket

func Pipelines

func Pipelines() map[int]*Pipeline

func RegisterProcessor

func RegisterProcessor(name string, procFact ProcessorFactory)

RegisterProcessor is called by the processor loader when the program starts each processor give its name and factory func()

func SetDataLocation

func SetDataLocation(location string)

func SetLogDebugMode

func SetLogDebugMode(components []string)

func SetLogOutputFile

func SetLogOutputFile(fileLocation string)

func SetLogVerboseMode

func SetLogVerboseMode(components []string)

func SetMetrics

func SetMetrics(s Metrics)

func SetProcessorLogOutputFile

func SetProcessorLogOutputFile(fileLocation string)

func Start

func Start(addr string)

Start runtime

func StartPipeline

func StartPipeline(configPipeline *config.Pipeline, configAgents []config.Agent) (int, error)

StartPipeline load all agents form a configPipeline and returns pipeline's ID

func Stop

func Stop() error

Stop each pipeline

func StopPipeline

func StopPipeline(ID int) error

Types

type Metrics

type Metrics interface {
	// contains filtered or unexported methods
}

IStats interface to any metric collector

func NewPrometheus

func NewPrometheus(address string, path string) Metrics

type MetricsVoid

type MetricsVoid struct{}

type Pipeline

type Pipeline struct {
	ID    int
	Label string

	ConfigLocation     string
	ConfigHostLocation string
	// contains filtered or unexported fields
}

type ProcessorFactory

type ProcessorFactory func() processors.Processor

type ProcessorFormatter

type ProcessorFormatter struct {
	Xpipeline  string
	Xagent     string
	Xprocessor string
	// contains filtered or unexported fields
}

func (*ProcessorFormatter) Format

func (p *ProcessorFormatter) Format(entry *logrus.Entry) ([]byte, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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