Documentation
¶
Index ¶
- Variables
- func ReadGlobal[T any](config *Config, namespace string) (T, bool, error)
- func ReadProfile[T any](config *Config, profileName, namespace string) (T, bool, error)
- func WriteGlobal[T any](config *Config, namespace string, value T) error
- func WriteProfile[T any](config *Config, profileName, namespace string, value T) error
- type Config
- type Option
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidExtensionNamespace = errors.New("invalid extension namespace") ErrDuplicateExtension = errors.New("duplicate extension registration") ErrExtensionNotRegistered = errors.New("extension not registered for scope") ErrExtensionTypeMismatch = errors.New("extension type does not match registration") ErrExtensionDecode = errors.New("cannot decode extension") ErrExtensionEncode = errors.New("cannot encode extension") )
Functions ¶
func ReadGlobal ¶
ReadGlobal reports absence separately from a stored JSON null or decoding error.
func ReadProfile ¶
ReadProfile reads one named profile without selecting or changing the default.
func WriteGlobal ¶
WriteGlobal fully replaces one global namespace with value, without retaining omitted payload fields. The extender owns compatibility, unknown-field retention, validation, and versioning for its replacement payload.
func WriteProfile ¶
WriteProfile fully replaces one namespace in an existing named profile, without retaining omitted payload fields. The extender owns compatibility, unknown-field retention, validation, and versioning for its replacement payload.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config binds registrations to an existing profiler/driver invocation. It does not automatically expose payloads through CLI output or diagnostics.
type Option ¶
Option registers one consumer shape for a namespace and scope. Registrations belong to one Config, never to a package-wide registry.
func WithGlobal ¶
WithGlobal declares the JSON shape owned by namespace in global settings. The extender owns compatibility, unknown-field retention, validation, and versioning for its payload; typed writes replace this namespace without retaining omitted fields.
func WithProfile ¶
WithProfile declares the JSON shape owned by namespace in each profile. The extender owns compatibility, unknown-field retention, validation, and versioning for its payload; typed writes replace this namespace without retaining omitted fields.