Debian Codegraph @

confmap/internal/marshaloption.go

raw
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 MarshalOption interface {
7 apply(*MarshalOptions)
8 }
9
10 // MarshalOptions is used by (*Conf).Marshal to toggle unmarshaling settings.
11 // It is in the `internal` package so experimental options can be added in xconfmap.
12 type MarshalOptions struct{}
13
14 type MarshalOptionFunc func(*MarshalOptions)
15
16 func (fn MarshalOptionFunc) apply(set *MarshalOptions) {
17 fn(set)
18 }