bplugin

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteLxdAuditResults

func ExecuteLxdAuditResults(sym plugin.Symbol, auditEvt models.LxdAuditResults) error

ExecuteLxdAuditResults execute on lxd api call hook

Types

type LxdBenchAuditResultHook

type LxdBenchAuditResultHook struct {
	Plugins []plugin.Symbol
}

LxdBenchAuditResultHook hold the plugin symbol for Lxd bench audit result Hook

type PluginLoader

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

PluginLoader keeps the context needed to find where Plugins and objects are stored.

func NewPluginLoader

func NewPluginLoader() (*PluginLoader, error)

NewPluginLoader return new plugin loader object with src and compiled folders

func (*PluginLoader) Compile

func (l *PluginLoader) Compile(name string, hookName string) (plugin.Symbol, error)

Compile the go plugin in a given path and hook name and return it symbol

func (*PluginLoader) Plugins

func (l *PluginLoader) Plugins() ([]string, error)

Plugins lists all the files in the Plugins

type PluginWorker

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

PluginWorker instance which match command data to specific pattern

func NewPluginWorker

func NewPluginWorker(commandMatchData *PluginWorkerData, log *zap.Logger) *PluginWorker

NewPluginWorker return new plugin worker instance

func (*PluginWorker) Invoke

func (pm *PluginWorker) Invoke()

Invoke invoke plugin accept audit bench results

type PluginWorkerData

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

PluginWorkerData encapsulate plugin worker properties

func NewPluginWorkerData

func NewPluginWorkerData(plChan chan models.LxdAuditResults, hook LxdBenchAuditResultHook, completedChan chan bool) *PluginWorkerData

NewPluginWorkerData return new plugin worker instance

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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