builder

package
v0.2.19 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get[T any](ctx context.Context, r Registry[T], name string) (T, error)

func MustGet

func MustGet[T any](ctx context.Context, r Registry[T], name string) T

func Names

func Names[T any](ctx context.Context, r Registry[T]) []string

Types

type Registry

type Registry[T any] interface {
	Register(name string, f T)
	Get(name string) (T, bool)
	Names() []string
	RegisteredFactories() map[string]T
	Reset()
}

func New

func New[T any]() Registry[T]

Jump to

Keyboard shortcuts

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