-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathplugin.go
More file actions
30 lines (24 loc) · 839 Bytes
/
plugin.go
File metadata and controls
30 lines (24 loc) · 839 Bytes
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
//go:generate mockery -name=^(Plugin)$ -output=./testutil -outpkg=testutil -case=snake
package plugin
import "github.com/bluemedora/bplogagent/entry"
// Plugin is a log monitoring component.
type Plugin interface {
// ID returns the id of the plugin.
ID() string
// Type returns the type of the plugin.
Type() string
// Start will start the plugin.
Start() error
// Stop will stop the plugin.
Stop() error
// CanOutput indicates if the plugin will output entries to other plugins.
CanOutput() bool
// Outputs returns the list of connected outputs.
Outputs() []Plugin
// SetOutputs will set the connected outputs.
SetOutputs([]Plugin) error
// CanProcess indicates if the plugin will process entries from other plugins.
CanProcess() bool
// Process will process an entry from a plugin.
Process(*entry.Entry) error
}