opentelemetry-collector
opentelemetry-collector copied to clipboard
[confighttp] Make `ToServerOption` into a sealed interface
ToServerOption
has underlying type func(*privateStruct)
. I think we should make it into an interface because of:
- consistency with other modules in this repository
- allows creating a hierarchy of options (e.g. we could have some
Option
s that work bothconfighttp
andconfigrpc
by creating in the future a shared package for both)
To solve this issue I think we should:
- Add guidance to
CONTRIBUTING.md
on how to add options - Make
confighttp
follow this guidance