Documentation
¶
Overview ¶
Package plugin provides plugin management for ReleasePilot.
Package plugin provides plugin management for ReleasePilot.
Index ¶
- Constants
- type ExecutorAdapter
- type Manager
- func (m *Manager) Close() error
- func (m *Manager) ExecuteHook(ctx context.Context, hook plugin.Hook, releaseCtx plugin.ReleaseContext) ([]plugin.ExecuteResponse, error)
- func (m *Manager) GetPluginInfo(name string) (*plugin.Info, error)
- func (m *Manager) ListPlugins() []plugin.Info
- func (m *Manager) LoadPlugins(ctx context.Context) error
- func (m *Manager) Shutdown()
Constants ¶
const DefaultPerPluginTimeout = 30 * time.Second
DefaultPerPluginTimeout is the default timeout for individual plugin execution.
const MaxConcurrentPluginExecutions = 10
MaxConcurrentPluginExecutions limits the number of plugins that can execute simultaneously. This prevents resource exhaustion from too many concurrent plugin processes.
const MaxGlobalHookTimeout = 2 * time.Minute
MaxGlobalHookTimeout is the maximum time allowed for all plugins to execute in a single hook. This prevents runaway plugin execution from blocking the entire release process.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExecutorAdapter ¶
type ExecutorAdapter struct {
// contains filtered or unexported fields
}
ExecutorAdapter adapts the Manager to the integration.PluginExecutor interface. This bridges the gap between the internal domain types and the public plugin API.
func NewExecutorAdapter ¶
func NewExecutorAdapter(manager *Manager) *ExecutorAdapter
NewExecutorAdapter creates a new adapter that wraps a Manager.
func (*ExecutorAdapter) ExecuteHook ¶
func (a *ExecutorAdapter) ExecuteHook(ctx context.Context, hook integration.Hook, releaseCtx integration.ReleaseContext) ([]integration.ExecuteResponse, error)
ExecuteHook executes all plugins for a given hook, adapting between domain and plugin types.
func (*ExecutorAdapter) ExecutePlugin ¶
func (a *ExecutorAdapter) ExecutePlugin(ctx context.Context, id integration.PluginID, req integration.ExecuteRequest) (*integration.ExecuteResponse, error)
ExecutePlugin executes a specific plugin. Note: Individual plugin execution by ID is not currently supported. Use ExecuteHook to execute all plugins for a given hook instead.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages plugin lifecycle and execution.
func NewManager ¶
NewManager creates a new plugin manager.
func (*Manager) ExecuteHook ¶
func (m *Manager) ExecuteHook(ctx context.Context, hook plugin.Hook, releaseCtx plugin.ReleaseContext) ([]plugin.ExecuteResponse, error)
ExecuteHook executes all plugins for a given hook in parallel. Plugins are executed concurrently for improved performance. Results are returned in a stable order (same order as plugin registration). A global timeout is applied to prevent runaway execution.
func (*Manager) GetPluginInfo ¶
GetPluginInfo returns info for a specific plugin.
func (*Manager) ListPlugins ¶
ListPlugins returns info for all loaded plugins.
func (*Manager) LoadPlugins ¶
LoadPlugins loads all configured plugins.