dahernan/goHystrix

Move Timeout, Name, and Group to CommandOptions

dahernan opened this issue · 1 comments

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??

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?