providerconfig

package
v1.28.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package providerconfig binds the configuration subtree that belongs to a registered provider — a storage backend, a session store, an authentication backend — into the provider's own typed struct.

It exists because a provider is NOT a mounted module, and until now only modules could carry typed configuration. A third-party storage backend could be selected by name and then had nowhere to read its endpoint from: `storage.ceph.endpoint` died as an unknown key before the provider ever ran. That is the gap this closes.

It lives under internal/ for the same reason internal/configbind does: the binding uses a third-party decoder, and exposing that type on a public surface would force every plugin author to depend on it (ADR-015). Providers reach this through a public method on their subsystem's config — storage.Config.BindProvider and friends — so the decoder never appears in an exported signature.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bind

func Bind(provider string, raw map[string]any, dst any) error

Bind decodes raw into dst, fills still-zero fields from their `default:` tags, and returns an error naming the provider when either step fails.

The order matters and mirrors module config binding (ADR-010 §2 layer 5): the file wins over the tag default, because a default is what you get when you said nothing — not something that overrides what you said.

Types

This section is empty.

Jump to

Keyboard shortcuts

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