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

Pass Context to the Run Method of a Runner #8

Merged
merged 2 commits into from
Dec 3, 2019

Conversation

pavelbrm
Copy link
Member

@pavelbrm pavelbrm commented Dec 3, 2019

This PR contains an important update to the daemon.Runner interface.

Since now, the Run method expects a mandatory context as an argument.

The reason for this change is that a service implementing the Runner interface needs a way to listen to the Done channel of a context, derived from the daemon's root context.
Until before now it was possible by:

  • creating a daemon instance
  • then getting a context from it by Ctx
  • and then by supplying the context to the service

With this change, a context will be automatically passed in to the Run method of the service.

@pavelbrm pavelbrm self-assigned this Dec 3, 2019
@pavelbrm pavelbrm merged commit 7a4ee2a into master Dec 3, 2019
@pavelbrm pavelbrm deleted the feature/pass-context-to-process branch December 3, 2019 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant