Documentation
¶
Overview ¶
Package plugins implements an RPP client in Reginald to run plugins.
Index ¶
- Constants
- func Initialize(ctx context.Context, plugins []*Plugin, cfgs map[string]any) error
- func ShutdownAll(ctx context.Context, plugins []*Plugin) error
- type Plugin
- func (p *Plugin) RunCmd(ctx context.Context, name string) error
- func (p *Plugin) RunTask(ctx context.Context, tt string, dir fspath.Path, opts taskcfg.Options) error
- func (p *Plugin) SetupCmd(ctx context.Context, name string, cfg []rpp.ConfigEntry) error
- func (p *Plugin) ValidateTask(ctx context.Context, tt string, opts taskcfg.Options) error
Constants ¶
View Source
const ( DefaultHandshakeTimeout = 5 * time.Second DefaultShutdownTimeout = 15 * time.Second DefaultMaxProtocolErrors = 5 )
Default values associated with the plugin client.
Variables ¶
This section is empty.
Functions ¶
func Initialize ¶
Initialize calls the "initialize" method on all plugins.
Types ¶
type Plugin ¶
type Plugin struct {
rpp.HandshakeResult
// contains filtered or unexported fields
}
A Plugin represents a plugin that acts as an RPP server and is run from this client.
func Load ¶
Load creates the processes for the plugins, performs the handshakes with them, returns a slice of the valid plugins.
func (*Plugin) RunTask ¶
func (p *Plugin) RunTask( ctx context.Context, tt string, dir fspath.Path, opts taskcfg.Options, ) error
RunTask runs a task with the given type tt from this plugin.
Click to show internal directories.
Click to hide internal directories.