registry

package
v0.9.8 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: MIT Imports: 7 Imported by: 1

Documentation

Overview

Package registry provides the global plugin registry for TerraCi. Plugins register themselves via init() and are discovered by capability using the ByCapability generic function.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All() []plugin.Plugin

All returns registered plugins in registration order.

func ByCapability

func ByCapability[T plugin.Plugin]() []T

ByCapability returns all plugins that implement the given capability interface.

func CollectContributions

func CollectContributions(ctx *plugin.AppContext) []*pipeline.Contribution

CollectContributions gathers pipeline contributions from all enabled PipelineContributor plugins.

func Get

func Get(name string) (plugin.Plugin, bool)

Get returns a plugin by name.

func PreflightsForStartup

func PreflightsForStartup() []plugin.Preflightable

PreflightsForStartup returns enabled plugins that participate in framework preflight for the current config state.

func Register

func Register(p plugin.Plugin)

Register adds a plugin to the global registry. Called from init() in plugin packages. Panics on duplicate names (fail-fast at startup).

func Reset

func Reset()

Reset clears the registry. Only for testing.

func ResetPlugins

func ResetPlugins()

ResetPlugins resets mutable state on all registered plugins that implement Resettable. The registry itself is NOT cleared — plugins stay registered, only their internal state (config, flags, cached clients) is zeroed. Intended for test isolation.

func ResolveBlobStoreProvider added in v0.9.4

func ResolveBlobStoreProvider(name string) (plugin.BlobStoreProvider, error)

ResolveBlobStoreProvider returns a named blob store backend provider.

func ResolveCIProvider added in v0.9.4

func ResolveCIProvider() (*plugin.ResolvedCIProvider, error)

ResolveCIProvider detects the active CI provider. Priority: env detection → TERRACI_PROVIDER env → single registered → configured.

func ResolveChangeDetector

func ResolveChangeDetector() (plugin.ChangeDetectionProvider, error)

ResolveChangeDetector returns the active ChangeDetectionProvider. Priority: single registered → configured+enabled → error.

func ResolveKVCacheProvider added in v0.9.4

func ResolveKVCacheProvider(name string) (plugin.KVCacheProvider, error)

ResolveKVCacheProvider returns a named KV cache backend provider.

Types

This section is empty.

Jump to

Keyboard shortcuts

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