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

Refactor cli #54

Merged
merged 4 commits into from
Oct 10, 2017
Merged

Refactor cli #54

merged 4 commits into from
Oct 10, 2017

Conversation

BasPH
Copy link
Contributor

@BasPH BasPH commented Oct 5, 2017

Wanted to work on some CLI commands mentioned in #16 and felt I first needed to refactor the CLI to have different commands:

  • Functionality-wise no changes
  • Added broker command so create broker is now executed with jocko broker ...
  • Removed the createtopic cli and placed it in the jocko main.go, now executed with jocko topic ...

This can now be easily extended with new commands such as jocko topic list, jocko topic create --name=topic1 or jocko consumer --topic=topic1.

brokerID = kingpin.Flag("id", "Broker ID").Int32()
debugLogs = kingpin.Flag("debug", "Enable debug logs").Default("false").Bool()
cli = kingpin.New("jocko", "Jocko, a Go implementation of Kafka")
logDir = cli.Flag("logdir", "A comma separated list of directories under which to store log files").Default("/tmp/jocko").String()
Copy link
Owner

@travisjeffery travisjeffery Oct 10, 2017

Choose a reason for hiding this comment

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

we can mv logDir into the brokerCmd

@travisjeffery
Copy link
Owner

I like it. Hashicorp uses a similar command/UI with their stuff like Consul. There's some minor fixes I'll make but I'll merge and fix. Thanks!

@travisjeffery travisjeffery merged commit 7689523 into travisjeffery:master Oct 10, 2017
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.

2 participants