Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Plugin ¶
type Plugin struct { Start PluginStartFunc Stop PluginStopFunc Call PluginCallFunc Name string Metadata types.PluginMetadata }
Plugin type
type PluginCallFunc ¶
type PluginCallFunc func(context.Context, *zap.Logger, *types.Payload) ([]*types.PowerlineReturn, error)
Called when we need to render a segment effectively
type PluginConfig ¶
type PluginConfig struct { UserHome string GowerlineDir string PluginName string // BoltDB is used as a K/V cache for data for plugins that // would need them. Careful though as it is not thread safe. BoltDB *bolt.DB // StorageDir is the directory that would hold plugin specific data // such as caches and what not. It will also hold the bolt databases // that comes with all plugins by default. StorageDir string // Config is a yaml node containing the configuration that // is specific to the plugin Config yaml.Node }
PluginConfig will be passed down to plugins
type PluginStartFunc ¶
Called when a plugin starts, returns data such as the plugin name
Click to show internal directories.
Click to hide internal directories.