Versions in this module Expand all Collapse all v1 v1.0.4 Jul 20, 2023 v1.0.2 Jul 20, 2023 Changes in this version + const ExitError + const ServiceError + const StartError + const StopError + var DefaultNotifySignals = [...]os.Signal + func DefaultErrorCallback(err *Error) + func DefaultExitCodeGetter(err *Error) int + func DefaultSignalCallback(sig os.Signal) bool + func LogErrorCallback(log *log.Logger) func(err *Error) + func SystemdNotify(state string) error — linux/amd64 + type Error struct + Err error + Type ErrorType + func (e Error) Error() string + type ErrorType int + func (t ErrorType) Type() string + type Option interface + func ErrorCallback(callback func(err *Error)) Option + func ExitCodeGetter(exitCodeGetter func(err *Error) int) Option + func OnClosed(callback func(s Service, l lifecycle.Lifecycle)) Option + func OnStarted(callback func(s Service, l lifecycle.Lifecycle)) Option + func SignalNotify(callback func(sig os.Signal) (exit bool), sig ...os.Signal) Option + func WithNotify(notify bool) Option + type Service interface + Run func() (exitCode int) + func New(name string, app lifecycle.Lifecycle, options ...Option) Service