File: handler.go

package info (click to toggle)
fever 1.0.5-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 512 kB
  • sloc: makefile: 17; sh: 12
file content (34 lines) | stat: -rw-r--r-- 912 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package processing

// DCSO FEVER
// Copyright (c) 2017, DCSO GmbH

import (
	"github.com/DCSO/fever/types"
	"github.com/DCSO/fever/util"
)

// Handler is an interface describing the behaviour for a component to
// handle events parsed from EVE input.
type Handler interface {
	GetEventTypes() []string
	GetName() string
	Consume(*types.Entry) error
}

// ConcurrentHandler is an interface describing the behaviour for a component to
// handle events parsed from EVE input, while concurrently performing other
// actions, such as collecting, integrating and/or forwarding data.
type ConcurrentHandler interface {
	Handler
	Run()
	Stop(chan bool)
}

// StatsGeneratingHandler is an interface describing a Handler which also
// periodically outputs performance statistics using the provided
// PerformanceStatsEncoder.
type StatsGeneratingHandler interface {
	Handler
	SubmitStats(*util.PerformanceStatsEncoder)
}