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

Break up the project and allow use subcommand #28

Merged
merged 1 commit into from
Nov 2, 2020

Conversation

simonswine
Copy link
Collaborator

This will enable the addition of other modes.

The default and only mode is produce, which should not break any
existing users.

@simonswine simonswine requested a review from a team October 30, 2020 17:27
This will enable the addition of other modes.

The default and only mode is produce, which should not break any
existing users.
Copy link

@jtlisi jtlisi left a comment

Choose a reason for hiding this comment

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

LGTM

pulsar: &pulsarConfig{},
}

cmd := app.app.Command(name, "Receive remote_write requests and produce messages on the pulsar bus").Default()
Copy link

@jtlisi jtlisi Oct 30, 2020

Choose a reason for hiding this comment

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

The default and only mode is produce, which should not break any existing users.

Question: When you set a command as Default() will it be the triggered command even if it's not provided?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes exactly apart from --help, both commands behave exactly the same way

./prometheus-pulsar-remote-write --x y
./prometheus-pulsar-remote-write produce --x y
# will fail
./prometheus-pulsar-remote-write invalid 

# will run consume
./prometheus-pulsar-remote-write consume

@simonswine simonswine merged commit 8fc65d4 into master Nov 2, 2020
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

2 participants