Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Plugin ¶
type Plugin interface { // Init is called in the agent`s startup phase. Init() error // Close is called in the agent`s cleanup phase. Close() error // String returns unique name of the plugin. String() string }
Plugin interface defines plugin's basic life-cycle methods.
type PluginDeps ¶
type PluginDeps struct { PluginName Log logging.PluginLogger Cfg config.PluginConfig }
PluginDeps defines common dependencies for use with plugins. It can easily be embedded in Deps for Plugin:
type Deps struct { infra.PluginDeps // other dependencies }
func (*PluginDeps) Close ¶
func (d *PluginDeps) Close() error
Close is an empty implementation used to avoid need for implementing it by plugins that do not need it.
func (*PluginDeps) Setup ¶
func (d *PluginDeps) Setup()
Setup sets nil dependencies to default instance using plugin's name.
type PluginName ¶
type PluginName string
PluginName is a part of the plugin's API. It's used by embedding it into Plugin to provide unique name of the plugin.
Click to show internal directories.
Click to hide internal directories.