registry

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRegistry

func NewRegistry(opts ...RegistryOption) ports.CapabilityRegistry

NewRegistry creates a new Registry with the given options.

Types

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

Registry implements CapabilityRegistry.

func (*Registry) GetSchema

func (r *Registry) GetSchema(kind string) (string, bool)

GetSchema retrieves the JSON Schema for a capability type.

func (*Registry) List

func (r *Registry) List() []string

List returns all registered capability type names.

func (*Registry) Register

func (r *Registry) Register(kind string, model interface{}) error

Register adds a schema generated from a Go struct.

type RegistryOption

type RegistryOption func(*registryConfig)

RegistryOption configures a Registry instance.

func WithStrictMode

func WithStrictMode(enabled bool) RegistryOption

WithStrictMode enables/disables strict mode for duplicate registrations. Default is true (fail on duplicates). Disable only for testing or hot-reloading.

Jump to

Keyboard shortcuts

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