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

Conversation

Projects
None yet
2 participants
@BasPH
Contributor

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()

This comment has been minimized.

@travisjeffery

travisjeffery Oct 10, 2017

Owner

we can mv logDir into the brokerCmd

@travisjeffery

travisjeffery Oct 10, 2017

Owner

we can mv logDir into the brokerCmd

@travisjeffery

This comment has been minimized.

Show comment
Hide comment
@travisjeffery

travisjeffery Oct 10, 2017

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!

Owner

travisjeffery commented Oct 10, 2017

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

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment