Document value access and focused inspection
This commit is contained in:
@@ -28,8 +28,24 @@ Start with one file, then choose the tasks your application needs:
|
||||
| Reuse settings or combine record lists | [Inheritance](#named-sibling-inheritance) and [identified sequences](#identified-prompt-sequences) |
|
||||
| Handle credentials | [Typed-secret reference](../config.md#typed-secret-references), [configured startup](#configured-secrets-startup), and the [direct-directory example](../../examples/consumers/consumers_test.go) |
|
||||
| Inspect sources, earlier values, or changes | [Inspect a completed load](#inspect-a-completed-load) and [diffs](#effective-configuration-diffs) |
|
||||
| Hand one result to library consumers | [Component handoff](#component-handoff) |
|
||||
| Upgrade an existing consumer | [Migration guidance](#intentional-migration-changes) |
|
||||
|
||||
## Component handoff
|
||||
|
||||
Register application and library rules in one definition, then load once and
|
||||
pass the whole result to each consumer. A consumer can select its named settings
|
||||
with `Value`, assert its own type, and follow effective field origins through
|
||||
`Metadata` and `SourceContext` to capture resources. It owns any runtime copy it
|
||||
needs. The maintained [one-library example](../../examples/consumers/result_component.go)
|
||||
shows registration, underlay defaults, handoff, and a focused inspection facade;
|
||||
the [two-library example](../../examples/consumers/result_composition.go) composes
|
||||
callbacks and identity registrations for two consumers.
|
||||
|
||||
Views focus reports while explicit metadata and explanation queries retain native
|
||||
application-root paths. See the [configuration contract](../config.md#layered-metadata)
|
||||
for ownership, scope, and frozen inspection behavior.
|
||||
|
||||
## Choosing a loading entry point
|
||||
|
||||
- Use [`Load`](../../lifecycle.go) with one source for an ordinary configuration.
|
||||
|
||||
Reference in New Issue
Block a user