Skip to content

Use Config Data Structs #243

Description

@bbickerton

Issue Description

At config load time, extract everything from viper into a ConfigData instance and save that as a field of Config. Retrieval functions will work with that instead of viper directly. We can still keep a reference to viper around and eventually implement config watching, in which case it would validate the data and replace c.configData on change. That would eliminate things like repeated URL parsing.

While centralizing this, move any provider specific flags from their cmd to their NewConfig so that they're all in one common place and can be captured with LoadConfig tests.

This applies to all cmds, coordinator, and providers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions