Debian Codegraph @

confmap/internal/unmarshaloption.go

raw symbols SCIP
1 // Copyright The OpenTelemetry Authors
2 // SPDX-License-Identifier: Apache-2.0
3
4 package internal // import "go.opentelemetry.io/collector/confmap/internal"
5
6 type UnmarshalOption interface {
7 apply(*UnmarshalOptions)
8 }
9
10 // UnmarshalOptions is used by (*Conf).Unmarshal to toggle unmarshaling settings.
11 // It is in the `internal` package so experimental options can be added in xconfmap.
12 type UnmarshalOptions struct {
13 IgnoreUnused bool
14 }
15
16 type UnmarshalOptionFunc func(*UnmarshalOptions)
17
18 func (fn UnmarshalOptionFunc) apply(set *UnmarshalOptions) {
19 fn(set)
20 }