Documentation
¶
Index ¶
- Variables
- func MapPayload(name string, event *Event) error
- func RandomString(strlen int) string
- func RegisterApi(i interface{})
- func RegisterPlugin(name string, creator Creator)
- func SliceContains(name string, list []string) bool
- type Agent
- type Caller
- type Creator
- type Event
- type Plugin
- type RunningPlugin
Constants ¶
This section is empty.
Variables ¶
View Source
var ApiRegistry = make(map[string]interface{})
View Source
var PluginRegistry = map[string]Creator{}
Functions ¶
func MapPayload ¶
func RandomString ¶
func RegisterApi ¶
func RegisterApi(i interface{})
func RegisterPlugin ¶
func SliceContains ¶
Types ¶
type Agent ¶
type Agent struct {
Queueing bool
Events chan Event
TestEvents chan Event
Shutdown chan struct{}
Plugins []*RunningPlugin
}
Agent runs codeflow and collects data based on the given config
func NewTestAgent ¶
NewTestAgent returns an Agent struct based off the given Config
func (*Agent) GetTestEvent ¶
GetTestEvent listens and returns requested event
func (*Agent) LoadPlugins ¶
func (*Agent) PluginNames ¶
Returns a list of strings of the configured plugins.
type Event ¶
type Plugin ¶
type Plugin interface {
// SampleConfig returns the default configuration of the Input
SampleConfig() string
// Description returns a one-sentence description on the Input
Description() string
// Start starts the Plugin service, whatever that may be
Start(chan Event) error
// Stop stops the services and closes any necessary channels and connections
Stop()
// Subscribe takes in an event message and validates it for Process
Subscribe() []string
// Process takes in an event message and tries to process it
Process(Event) error
}
Click to show internal directories.
Click to hide internal directories.