-
Notifications
You must be signed in to change notification settings - Fork 2
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 context to Start, Init, Stop, and Finalize methods #5
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this be the appropriate PR to add Process and Init options for ProcessBaseContext
and InitializerBaseContext
? I envision those working similar to how http.Server.BaseContext
works where you pass in a function of func(context.Context) context.Context
to allow you to modify the context derived for each of the Process
's functions. In addition to both ProcessBaseContext
and InitializerBaseContext
I thought that the bootstrap could have a WithBaseContext
with a similar signature that would be run before all those other individual methods run. This way a user could choose to either have an overall modification for all the contexts, or just modify the one for their specific process or initializer.
We may also want to call out in the docs specifically which domains a context is associated with. If you have a timeout/deadline/etc set on a context, is that same context used for |
Docs will be out of date as they're transferred to the new docsite and rewritten. |
@aphistic Updated. Will still need to add a WithContext/WithContextFilter for the context passed to Run from the boostrapper. |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
I started writing a comment awhile ago but I guess I never actually sent it. =/ I'm not sure I like the term "Filter" for the thing you use to modify the context because, to me, it implies you're removing something when it's actually the opposite in this case. |
I'm not married to those names. I can update them globally before I tag v2. Could you possibly make a list of other clunky names I could take care of around the same time? |
Sure, do you know when you'll need that? I can make sure to have it reviewed by then. |
Anytime before we cut the v2 branch since I'd want to get rid of the bad ones immediately. |
Just mention them as you see them and I'll do a quick rename everywhere. |
Closes go-nacelle/nacelle#5.
Changes: