cwplugin

package
v0.3.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	Insert(types.SignalOccurence) error
	ReadAT(time.Time) ([]map[string]string, error)
	Delete(string) (int, error)
	Init(map[string]string) error
	Flush() error
	Shutdown() error
	DeleteAll() error
	StartAutoCommit() error
}

the structure returned by the function New() of the plugin must match this interface

type BackendManager

type BackendManager struct {
	// contains filtered or unexported fields
}

func NewBackendPlugin

func NewBackendPlugin(outputConfig map[string]string) (*BackendManager, error)

func (*BackendManager) Delete

func (b *BackendManager) Delete(target string) (int, error)

func (*BackendManager) DeleteAll

func (b *BackendManager) DeleteAll() error

func (*BackendManager) Flush

func (b *BackendManager) Flush() error

func (*BackendManager) Insert

func (b *BackendManager) Insert(sig types.SignalOccurence) error

Insert the signal for all the plugins

func (*BackendManager) InsertOnePlugin

func (b *BackendManager) InsertOnePlugin(sig types.SignalOccurence, pluginName string) error

Insert the signal for the plugin specified in the config["plugin"] parameter

func (*BackendManager) IsBackendPlugin

func (b *BackendManager) IsBackendPlugin(plugin string) bool

func (*BackendManager) ReadAT

func (b *BackendManager) ReadAT(timeAT time.Time) ([]map[string]string, error)

func (*BackendManager) Shutdown added in v0.2.0

func (b *BackendManager) Shutdown() error

func (*BackendManager) StartAutoCommit added in v0.2.3

func (b *BackendManager) StartAutoCommit() error

type BackendPlugin

type BackendPlugin struct {
	Name           string `yaml:"name"`
	Path           string `yaml:"path"`
	ConfigFilePath string
	//Config is passed to the backend plugin.
	//It contains specific plugin config + plugin config from main yaml file
	Config map[string]string `yaml:"config"`
	ID     string
	// contains filtered or unexported fields
}

type NotificationManager

type NotificationManager struct {
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL