Documentation
¶
Overview ¶
Package generator hosts FastConf's built-in contracts.Generator implementations. Generators synthesise configuration layers dynamically at assemble time. They are first-class peers of Provider but produce []contracts.RawLayer instead of one map[string]any.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildInfo ¶
type BuildInfo struct {
// NameStr overrides Name(); defaults to "buildinfo".
NameStr string
// Keys map dotted paths to string values.
Keys map[string]string
}
BuildInfo emits a single JSON Source containing the supplied dotted.key=value pairs. Typical use: stamp `app.version`, `app.commit`, and `app.builtAt` at link time into the config tree so downstream services can serve /healthz with build provenance.
Example:
fastconf.WithGenerator(&generator.BuildInfo{
Keys: map[string]string{
"app.version": Version,
"app.commit": Commit,
},
})
Click to show internal directories.
Click to hide internal directories.