Documentation ¶
Index ¶
- Constants
- Variables
- type CloseFunc
- type ConfigFunc
- type ConfigMap
- type FlushFunc
- type PluginProgram
- func (pp *PluginProgram) Close() (err error)
- func (pp *PluginProgram) Config(vc *config.VariableConfig, tg Tagger) error
- func (pp *PluginProgram) Flush() []*entry.Entry
- func (pp *PluginProgram) Process(ents []*entry.Entry) ([]*entry.Entry, error)
- func (pp *PluginProgram) Ready() (r bool)
- func (pp *PluginProgram) Run(to time.Duration) (err error)
- func (pp *PluginProgram) Start() (err error)
- type ProcessFunc
- type StartFunc
- type Tagger
- type TestTagger
Constants ¶
View Source
const ( BuiltinPackageName string = `gravwell` ConfigMapName string = `ConfigMap` TaggerName string = `Tagger` ExecuteFuncName string = `Execute` ConfigFuncName string = `Config` FlushFuncName string = `Flush` ProcessFuncName string = `Process` StartFuncName string = `Start` CloseFuncName string = `Close` )
Variables ¶
View Source
var ( ErrInvalidScript = errors.New("invalid plugin program") ErrNotReady = errors.New("not ready") )
Functions ¶
This section is empty.
Types ¶
type ConfigFunc ¶
type PluginProgram ¶
func NewPluginProgram ¶
func NewPluginProgram(content []byte, debug bool) (pp *PluginProgram, err error)
func (*PluginProgram) Close ¶
func (pp *PluginProgram) Close() (err error)
func (*PluginProgram) Config ¶
func (pp *PluginProgram) Config(vc *config.VariableConfig, tg Tagger) error
func (*PluginProgram) Flush ¶
func (pp *PluginProgram) Flush() []*entry.Entry
func (*PluginProgram) Ready ¶
func (pp *PluginProgram) Ready() (r bool)
Ready indicates if the program is running and has registered all the things we need
func (*PluginProgram) Run ¶
func (pp *PluginProgram) Run(to time.Duration) (err error)
Run will execute the underlying program and blocks for timeout time, it is waiting for the program to come up and register itself if it does not, then we kill it
func (*PluginProgram) Start ¶ added in v3.8.4
func (pp *PluginProgram) Start() (err error)
type Tagger ¶
type Tagger interface { NegotiateTag(name string) (entry.EntryTag, error) LookupTag(entry.EntryTag) (string, bool) KnownTags() []string }
this is a copy of the interface in processors, but we can't import processors due to import cycles
type TestTagger ¶ added in v3.8.4
type TestTagger struct {
// contains filtered or unexported fields
}
func NewTestTagger ¶ added in v3.8.4
func NewTestTagger() *TestTagger
func (*TestTagger) KnownTags ¶ added in v3.8.4
func (tt *TestTagger) KnownTags() (r []string)
func (*TestTagger) LookupTag ¶ added in v3.8.4
func (tt *TestTagger) LookupTag(tag entry.EntryTag) (r string, ok bool)
func (*TestTagger) NegotiateTag ¶ added in v3.8.4
func (tt *TestTagger) NegotiateTag(name string) (tag entry.EntryTag, err error)
Click to show internal directories.
Click to hide internal directories.