plugin

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package plugin provides plugin management for ReleasePilot.

Package plugin provides plugin management for ReleasePilot.

Index

Constants

View Source
const DefaultPerPluginTimeout = 30 * time.Second

DefaultPerPluginTimeout is the default timeout for individual plugin execution.

View Source
const MaxConcurrentPluginExecutions = 10

MaxConcurrentPluginExecutions limits the number of plugins that can execute simultaneously. This prevents resource exhaustion from too many concurrent plugin processes.

View Source
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

ExecuteHook executes all plugins for a given hook, adapting between domain and plugin types.

func (*ExecutorAdapter) ExecutePlugin

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

func NewManager(cfg *config.Config) *Manager

NewManager creates a new plugin manager.

func (*Manager) Close

func (m *Manager) Close() error

Close is an alias for Shutdown.

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

func (m *Manager) GetPluginInfo(name string) (*plugin.Info, error)

GetPluginInfo returns info for a specific plugin.

func (*Manager) ListPlugins

func (m *Manager) ListPlugins() []plugin.Info

ListPlugins returns info for all loaded plugins.

func (*Manager) LoadPlugins

func (m *Manager) LoadPlugins(ctx context.Context) error

LoadPlugins loads all configured plugins.

func (*Manager) Shutdown

func (m *Manager) Shutdown()

Shutdown shuts down all plugins.

Directories

Path Synopsis
Package manager provides plugin management functionality for ReleasePilot.
Package manager provides plugin management functionality for ReleasePilot.

Jump to

Keyboard shortcuts

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