Documentation
¶
Overview ¶
Package meta provides metadata types that describe the origin and version of configuration values.
Key Types ¶
- Info — full metadata for a value: Key (keypath.KeyPath), Source (SourceInfo), and Revision (RevisionType).
- SourceInfo — identifies where a value came from: Name (string) and Type (SourceType).
- SourceType — enum for source classification: UnknownSource, EnvDefaultSource, StorageSource, FileSource, EnvSource, ModifiedSource.
- RevisionType — a string identifier for the configuration revision (e.g., commit hash, timestamp). Empty when not applicable.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Info ¶
type Info struct {
// Key corresponds to the actual location of the value.
Key keypath.KeyPath
// Source information about the source/collector from which the value was obtained.
Source SourceInfo
// Revision number, if applicable.
Revision RevisionType
}
Info contains metadata about a value in the configuration. Used to display the actual origin of the obtained value.
type RevisionType ¶
type RevisionType string
RevisionType defines a revision identifier of configuration, if applicable. Typically, a string (e.g., commit hash, timestamp). If revision is not supported, it should be empty.
type SourceInfo ¶
type SourceInfo struct {
// Name of the source where the value was obtained.
Name string
// Type of the source (file, environment variable, etc.).
Type SourceType
}
SourceInfo contains information about the source where the value originated.
type SourceType ¶
type SourceType int
SourceType defines the type of configuration source.
const ( // UnknownSource indicates an undefined source. UnknownSource SourceType = iota // EnvDefaultSource indicates default values from environment variables (e.g., TT_FOO_DEFAULT). EnvDefaultSource // StorageSource indicates an external centralized storage (e.g., Etcd or TcS). StorageSource // FileSource indicates a local file. FileSource // EnvSource indicates environment variables. EnvSource // ModifiedSource indicates dynamically modified data (e.g., at runtime) for MutableConfig. // Note: ModifiedSource is not implemented yet and is under active development. ModifiedSource )
Click to show internal directories.
Click to hide internal directories.