Skip to content
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

Add mapstructure tags to echox.Config #239

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fmontorsi-equinix
Copy link

@fmontorsi-equinix fmontorsi-equinix commented Aug 6, 2024

This PR makes it possible to include the echox.Config structure in the configuration structure passed to viper.UnmarshalExact().
This also aligns the echox.Config structure to the use of mapstructure tags like all other Config structures inside config.go files like:

  • ./otelx/config.go
  • ./ginx/config.go
  • ./loggingx/config.go
  • ./events/config.go
  • ./crdbx/config.go
    Note that the naming of mapstructure tags has been aligned to match the corresponding naming in the pre-existing function MustViperFlags.

IMPORTANT: applications using the echox.Config structure should be reviewed to make sure they employ (in their configuration files) the exact syntax encoded in the mapstructure tags. For example if an application is exposing in its configuration file a parameter named 'shutdownGracePeriod', such parameter should be renamed to 'shutdown-grace-period' (this brings consistency with the viperx/cobrax bindings created by MustViperFlags method).

@fmontorsi-equinix fmontorsi-equinix requested a review from a team as a code owner August 6, 2024 09:33
Signed-off-by: Francesco Montorsi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant