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

Allow BackoffStrategy to be set via flag, document BackoffStrategy.SetConfig #126

Merged
merged 1 commit into from
Mar 24, 2015
Merged

Allow BackoffStrategy to be set via flag, document BackoffStrategy.SetConfig #126

merged 1 commit into from
Mar 24, 2015

Conversation

twmb
Copy link
Contributor

@twmb twmb commented Mar 23, 2015

  • Documents that go-nsq calls SetConfig on BackoffStrategy, allowing
    implementors to use config values in their own Calculate implementation.
  • Allows full_jitter and exponential strategies to be set via the
    backoff_strategy flag.

@mreiferson
Copy link
Member

at a quick glance this looks great - curious to hear your thoughts on my response to your question in #125

@twmb
Copy link
Contributor Author

twmb commented Mar 23, 2015

I just saw it. I don't mind much either way. If a person wanted to use the config they could just

cfg := nsq.NewConfig()
myStrat.cfg = cfg
cfg.Set("backoff_strategy", myStrat)

Because it's so easy to use the config regardless, it doesn't make much sense to expose setConfig and document it, especially because it also clutters the api.

- Allows full_jitter and exponential strategies to be set via a
  backoff_strategy flag.
@mreiferson
Copy link
Member

Agreed - let's remove those changes then, thanks!

@mreiferson
Copy link
Member

LGTM

mreiferson added a commit that referenced this pull request Mar 24, 2015
Allow BackoffStrategy to be set via flag, document BackoffStrategy.SetConfig
@mreiferson mreiferson merged commit edb5658 into nsqio:master Mar 24, 2015
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