styx/plugins/main.go

24 lines
505 B
Go
Raw Permalink Normal View History

2020-02-25 10:05:31 +01:00
package plugins
var StyxPlugins = []StyxPlugin{}
// StyxPlugin defines the general plugin architecture.
type StyxPlugin interface {
Initialize()
Run()
Stop()
Check()
}
// RegisterStyxPlugin makes an enrichment plugin available for usage
func RegisterStyxPlugin(p StyxPlugin) {
StyxPlugins = append(StyxPlugins, p)
}
// Worker is a generic set of fields to support graceful start/stop of a concurrent service.
type Worker struct {
StopChan chan bool
StoppedChan chan bool
Running bool
}