cwplugin

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 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
}

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(path string, isDaemon bool) (*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

type BackendPlugin

type BackendPlugin struct {
	Name           string `yaml:"name"`
	Path           string `yaml:"path"`
	ConfigFilePath string
	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