-
Notifications
You must be signed in to change notification settings - Fork 678
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
Shutdowner interface and Windows trigger #225
Conversation
// Shutdown provides a place to clean up program execution when the system is being shutdown. | ||
// It is essentially the same as Stop but for the case where machine is being shutdown/restarted | ||
// instead of just normally stopping the service. | ||
Shutdown(s Service) error |
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.
This is a fine implementation.
Please also indicate that if shutdown is called, that either: stop is also called after Shutdown, or the comment mentions that Stop will not be call if shutdown is called.
Otherwise LGTM.
One NIT, then can merge. |
Stop won't be called when Shutdown is.
I assume triggering Shutdown call is enough so Stop one is not required, added to doc block. |
Hello! Can you tell us please, can this be merged soon? Thank you in advance! |
1 similar comment
Hello! Can you tell us please, can this be merged soon? Thank you in advance! |
Hello @kardianos, if you have time, can you merge this PR please? |
* chore: Add explicit AIX tag to AIX specific sources (kardianos#245) Add an explicit AIX build restriction to the AIX specific source files to allow Go versions <1.12 to compile the module. * Update .travis.yml (kardianos#248) Adding both Power & Intel support arch: ppc64le/amd64 * Detection of interactive session fixed for systemd user services (kardianos#246) Co-authored-by: Pavel Bazika <pavel.bazika@icewarp.com> * service(windows): add support for delayed auto start service (kardianos#244) * service(windows): added option flag for delayed automatic start * service(windows): added option flag for delayed automatic start Co-authored-by: Utkarsh Dixit <utkarsh.dixit@siemens.com> * Fix issue with systemd inactive status. (kardianos#243) * Run commands as user on systemd when using user service (kardianos#224) * Shutdowner interface and Windows trigger (kardianos#225) * Shutdowner interface and Windows trigger * Updating Shutdown doc Stop won't be called when Shutdown is. Co-authored-by: Juan Hernandez <jhernandez@newrelic.com> * service: go fmt * Add support for OpenRC services (alpine/busybox) (kardianos#252) Co-authored-by: secDre4mer <61268450+secDre4mer@users.noreply.github.com> Co-authored-by: santosh653 <70637961+santosh653@users.noreply.github.com> Co-authored-by: pavelbazika <pavelbazika@users.noreply.github.com> Co-authored-by: Pavel Bazika <pavel.bazika@icewarp.com> Co-authored-by: Utkarsh Dixit <utkarsh.extc@gmail.com> Co-authored-by: Utkarsh Dixit <utkarsh.dixit@siemens.com> Co-authored-by: Blake Rouse <blake.rouse@elastic.co> Co-authored-by: Oliver Kraemer <oliverkra@gmail.com> Co-authored-by: jhvaras <jhvaras@gmail.com> Co-authored-by: Juan Hernandez <jhernandez@newrelic.com> Co-authored-by: Daniel Theophanes <kardianos@gmail.com> Co-authored-by: Karen Almog <8340149+trawler@users.noreply.github.com>
This PR addresses #220 replacing #221
Instead of polluting the whole service.Interface another interface is added and triggered from Windows implementation.