-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[confmap] Add mapstructure hook function for unmarshalling confmap.Conf #6029
[confmap] Add mapstructure hook function for unmarshalling confmap.Conf #6029
Conversation
Codecov ReportBase: 91.99% // Head: 92.01% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #6029 +/- ##
==========================================
+ Coverage 91.99% 92.01% +0.01%
==========================================
Files 213 213
Lines 13340 13333 -7
==========================================
- Hits 12272 12268 -4
+ Misses 850 846 -4
- Partials 218 219 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
fc7460e
to
25a8413
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's start with a small PR to deprecate/move current interface and then the other PR.
bd45155
to
71cca53
Compare
This allows structs to implement custom unmarshaling behaviors when being unmarshaled from confmap.Conf.
71cca53
to
233c74d
Compare
600275f
to
de697ef
Compare
Contrib tests should pass once open-telemetry/opentelemetry-collector-contrib#14011 (review) is merged |
This also moves the Unmarshallable interface from
config
toconfmap
in order to avoidan import cycle. This makes some sense anyways because the interface is concerned
specifically with unmarshalling a confmap.Conf. The config.Unmarshallable interface
is deprecated and changed to an alias of confmap.Unmarshallable.
Rehash of #4879