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 RegisterFlagsWithPrefix to config structs #2414

Merged
merged 1 commit into from
Jul 27, 2020

Commits on Jul 24, 2020

  1. add RegisterFlagsWithPrefix to config structs

    All config structs now have a RegisterFlagsWithPrefix function that
    allows specifying a prefixed string to append to all flag names. This
    may be used by clients to namespace support for Promtail in a larger
    application (e.g., grafana/agent).
    
    When implementing this PR, I noticed a few config structs were
    incorrectly registering to the global flagset rather than the flagset
    passed to RegisterFlags. This PR also includes a fix for that and
    ensures every option is registered to the flagset in the parameter.
    
    Related to grafana#2405.
    rfratto committed Jul 24, 2020
    Configuration menu
    Copy the full SHA
    f1a79cd View commit details
    Browse the repository at this point in the history