tasks

package
v0.0.0-...-e6af7e3 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2016 License: LGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EmptyCommonTask = CommonTask{
		Id:       "",
		PrevTime: -1,
		CurrTime: -1}
)

Functions

This section is empty.

Types

type AggregationTask

type AggregationTask struct {
	CommonTask
	// Name of the current aggregation config
	Config string
	// Name of handled parsing config
	ParsingConfigName string
	// Content of the current parsing config
	ParsingConfig configs.ParsingConfig
	// Current aggregation config
	AggregationConfig configs.AggregationConfig
	// Hosts
	Hosts hosts.Hosts
	// Parsing results
	Results map[string]TaskResult
}

func (*AggregationTask) Group

func (a *AggregationTask) Group() string

func (*AggregationTask) Raw

func (a *AggregationTask) Raw() ([]byte, error)

type CommonTask

type CommonTask struct {
	Id       string `codec:"Id"`
	PrevTime int64  `codec:"PrevTime"`
	CurrTime int64  `codec:"CurrTime"`
}

func (*CommonTask) Tid

func (c *CommonTask) Tid() string

type DataItem

type DataItem map[string]interface{}

For senders

type DataType

type DataType map[string]DataItem

type FetcherTask

type FetcherTask struct {
	CommonTask
	Target string `codec:"Target"`
}

type ParsingResultCollector

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

func NewParsingResultCollector

func NewParsingResultCollector(capacity int) *ParsingResultCollector

func (*ParsingResultCollector) Data

func (*ParsingResultCollector) Put

func (p *ParsingResultCollector) Put(name string, res TaskResult)

type ParsingTask

type ParsingTask struct {
	CommonTask
	// Hostname of target
	Host string
	// Name of handled parsing config
	ParsingConfigName string
	// Content of the current parsing config
	ParsingConfig configs.ParsingConfig
	// Content of aggreagtion configs
	// related to the current parsing config
	AggregationConfigs map[string]configs.AggregationConfig
}

func (*ParsingTask) Group

func (p *ParsingTask) Group() string

func (*ParsingTask) Raw

func (p *ParsingTask) Raw() ([]byte, error)

type Task

type Task interface {
	Tid() string
	Raw() ([]byte, error)
	Group() string
}

type TaskResult

type TaskResult string

Jump to

Keyboard shortcuts

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