stagereg

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package stagereg is the adapter registry every pipeline stage package uses: adapters register a factory under a name at init(), and the engine looks factories up by name. It imports nothing from TokenHound.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registry

type Registry[F any] struct {
	// contains filtered or unexported fields
}

Registry maps adapter names to factories of type F. The zero value is ready to use and safe for concurrent use.

func (*Registry[F]) Lookup

func (r *Registry[F]) Lookup(name string) (F, bool)

Lookup returns the factory registered under name.

func (*Registry[F]) Names

func (r *Registry[F]) Names() []string

Names returns every registered adapter name, sorted.

func (*Registry[F]) Register

func (r *Registry[F]) Register(name string, factory F)

Register adds factory under name. It panics when name is empty or already registered: both are programming errors caught at init().

Jump to

Keyboard shortcuts

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