registry

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: Apache-2.0 Imports: 6 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNilExtension       = errors.New("extension is nil")
	ErrDuplicateExtension = errors.New("extension already registered")
	ErrEmptyExtensionName = errors.New("extension name is empty")
)

Functions

func Clear

func Clear()

Clear clears the registry (mainly for testing)

func GetExtensions

func GetExtensions() map[string]Entry

GetExtensions returns all registered extensions

func GetExtensionsAndDependencies

func GetExtensionsAndDependencies() (map[string]ext.Interface, map[string][]string)

GetExtensionsAndDependencies returns all extensions and their dependency graph

func GetExtensionsByGroup

func GetExtensionsByGroup(groupName string) map[string]Entry

GetExtensionsByGroup returns extensions in a specific group

func Register

func Register(extension ext.Interface)

Register registers a single extension

func RegisterE added in v0.2.5

func RegisterE(extension ext.Interface) error

RegisterE registers a single extension and returns validation errors.

func RegisterToGroup

func RegisterToGroup(extension ext.Interface, group string)

RegisterToGroup registers an extension to a specific group

func RegisterToGroupE added in v0.2.5

func RegisterToGroupE(extension ext.Interface, group string) error

RegisterToGroupE registers an extension to a specific group and returns validation errors for nil, empty, or duplicate registrations.

func RegisterToGroupWithWeakDeps

func RegisterToGroupWithWeakDeps(extension ext.Interface, group string, weakDeps []string)

RegisterToGroupWithWeakDeps registers an extension to a group with weak dependencies

func RegisterToGroupWithWeakDepsE added in v0.2.5

func RegisterToGroupWithWeakDepsE(extension ext.Interface, group string, weakDeps []string) error

RegisterToGroupWithWeakDepsE registers an extension to a group with weak dependencies and returns validation errors.

func RegisterWithWeakDeps

func RegisterWithWeakDeps(extension ext.Interface, weakDeps []string)

RegisterWithWeakDeps registers an extension with weak dependencies

func RegisterWithWeakDepsE added in v0.2.5

func RegisterWithWeakDepsE(extension ext.Interface, weakDeps []string) error

RegisterWithWeakDepsE registers an extension with weak dependencies and returns validation errors.

Types

type Entry

type Entry struct {
	Instance         ext.Interface
	Group            string
	WeakDependencies []string // Optional dependencies that won't block initialization
}

Entry represents an entry in the registry

Jump to

Keyboard shortcuts

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