-
Notifications
You must be signed in to change notification settings - Fork 85
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
add Handle() callback to support Service-specific signal handling #28
base: main
Are you sure you want to change the base?
Conversation
3bf765d
to
e82c4dc
Compare
service.Context() is called after Init() (and after Start()) on unixes, so some users did not expect or test with Context() called before Init()
fb4bf85
to
7a96e00
Compare
I've pulled in #29 here so I can more easily get a build going |
@mreiferson I usually provide a package level function such as I like that the I don't have a hard stance for public projects, especially since we don't have to worry about unwrapping. What are your thoughts? I'm open. |
@judwhite I'm not sure that cleans things up in this case? The caller ( |
Yeah, this is the opposite direction of the usual pattern. This error returned by the user's callback to this library, is really a kind of sentinel value. It could alternatively be a boolean, or an enum of some kind ... side note: the commit at the head of this branch is now referenced by https://github.com/nsqio/nsq/blob/v1.2.1/go.mod#L20 so we should theoretically be sure to keep this commit alive in mreiferson's fork indefinitely, maybe on another new branch so that this one can have requested changes rebased/squashed before merge |
This does what I said I was going to do in nsqio/nsq#1331