plugins

package
v0.0.0-...-d59b6d3 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin interface {
	GetReport(log *logrus.Entry) map[string]string
}

Plugin sets the interface that a plugin must provide

type PluginManager

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

PluginManager holds the context of all loaded plugins

func NewPluginManger

func NewPluginManger(paths []string) (*PluginManager, error)

NewPluginManger tries to load all plugin referenced in `paths` and returns a context that allows fetching reports from them

func (*PluginManager) GetReports

func (pm *PluginManager) GetReports(log *logrus.Logger) map[string]string

GetReports rounds up all the reports from the loaded plugins

Directories

Path Synopsis
This plugin contributes some simple network stats
This plugin contributes some simple network stats

Jump to

Keyboard shortcuts

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