Files
Evan BradleyandGitHub 9be8cf2b64 [chore][confmap] Move functionality to the internal package (#13555)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Move substantial amounts of confmap's functionality to the internal
package. This allows us to share the functionality with xconfmap and
therefore add experimental functionality to confmap without risking
breaking changes.

I'm not a huge fan of the added indirection this introduces, but I think
this is a fairly standard pattern, is fairly straightforward to trace
from the top-level package down (e.g. confmap.Conf -> internal.Conf),
and is probably the simplest way to accomplish this.

<!-- Issue number if applicable -->
#### Link to tracking issue

Likely required for
https://github.com/open-telemetry/opentelemetry-collector/issues/13421
2025-08-06 16:10:54 +00:00

16 lines
636 B
Go

// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
package internal // import "go.opentelemetry.io/collector/confmap/internal"
// ExpandedValue holds the YAML parsed value and original representation of a value.
// It keeps track of the original representation to be used by the 'useExpandValue' hook
// if the target field is a string. We need to keep both representations because we don't know
// what the target field type is until `Unmarshal` is called.
type ExpandedValue struct {
// Value is the expanded value.
Value any
// Original is the original representation of the value.
Original string
}