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 Timeout, Name, and Group to CommandOptions #7

Open
dahernan opened this issue Apr 1, 2014 · 1 comment
Open

Move Timeout, Name, and Group to CommandOptions #7

dahernan opened this issue Apr 1, 2014 · 1 comment

Comments

@dahernan
Copy link
Owner

dahernan commented Apr 1, 2014

I'm thinking of moving the methods Timeout(), Name(), and Group() to CommandOptions and keep the Interface simple.

You can pass the options to the NewCommand as following

NewCommand(interface, commandOptions, circuitOptions)

@zeisss any advice??

@zeisss
Copy link
Contributor

zeisss commented Apr 1, 2014

I would veto that IMHO. My preference would still be having something I described in #6.

Reasons:
The author of the commands has better insights into the needed circuitbreaker options than a "user" of the commands (The commands could come in library and are just used a client-lib by some other service).
Also I don't want to copy&paste the options-creation code-snippet to every place that initialized the command (the same command could be used at multiple places).

We maybe should make a list of all the options we have first - I was just thinking that we may want to set certain options like the circuitbreaker globally and not per-command?

How is the circuit breaker currently found/shared? Per group+command-name?

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

No branches or pull requests

2 participants