add Handle() callback to support Service-specific signal handling#28
add Handle() callback to support Service-specific signal handling#28mreiferson wants to merge 2 commits intojudwhite:mainfrom
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 |
|
Yep, pushed to https://github.com/mreiferson/go-svc/tree/nsq-v1.2.1 |
This does what I said I was going to do in nsqio/nsq#1331