cwplugin

package
v0.3.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2020 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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