meta

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: BSD-2-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package meta provides metadata types that describe the origin and version of configuration values.

Key Types

Index

Constants

View Source
const ModifiedSourceName = "modified"

ModifiedSourceName is the canonical Source name set on tree nodes mutated at runtime via MutableConfig. It is the wire-level counterpart of ModifiedSource.

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.
	ModifiedSource
)

Jump to

Keyboard shortcuts

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