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

Move server init into influx pkg #9

Merged
merged 1 commit into from
Mar 1, 2022
Merged

Move server init into influx pkg #9

merged 1 commit into from
Mar 1, 2022

Conversation

leizor
Copy link
Contributor

@leizor leizor commented Feb 28, 2022

This PR moves most of the logic for starting up a server from the main package to the influx package.

@leizor leizor merged commit 25c6cfb into main Mar 1, 2022
@leizor leizor deleted the leizor/run branch March 1, 2022 17:40
)

// Register flags.
flag.BoolVar(&enableAuth, "auth.enable", true, "enable X-Scope-OrgId header")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@leizor

As a rule, libraries should never define flags, only binaries should do that. Instead, all setup should be done programmatically, possibly with a config struct. the outermost binary can define flags as needed. Can you create a followup PR that moves the flags out of the library and into the binary?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approved this but also Agree with @ywwg 's comment.

You can mirror how other projects like query-tee https://github.com/cortexproject/cortex/blob/master/cmd/query-tee/main.go#L17-L31 does it.

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.

None yet

3 participants