Versions in this module Expand all Collapse all v1 v1.1.1 Jul 11, 2020 Changes in this version + var ConsoleLogger = consoleLogger + var ControlAction = [5]string + var ErrNameFieldRequired = errors.New("Config.Name field is required.") + var ErrNoServiceSystemDetected = errors.New("No service system detected.") + var ErrNotInstalled = errors.New("the service is not installed") + func ChooseSystem(a ...System) + func Control(s Service, action string) error + func Interactive() bool + func Platform() string + type Config struct + Arguments []string + ChRoot string + Dependencies []string + Description string + DisplayName string + Executable string + Name string + Option KeyValue + UserName string + WorkingDirectory string + type Interface interface + Start func(s Service) error + Stop func(s Service) error + type KeyValue map[string]interface + type Logger interface + Error func(v ...interface{}) error + Errorf func(format string, a ...interface{}) error + Info func(v ...interface{}) error + Infof func(format string, a ...interface{}) error + Warning func(v ...interface{}) error + Warningf func(format string, a ...interface{}) error + type Service interface + Install func() error + Logger func(errs chan<- error) (Logger, error) + Platform func() string + Restart func() error + Run func() error + Start func() error + Status func() (Status, error) + Stop func() error + String func() string + SystemLogger func(errs chan<- error) (Logger, error) + Uninstall func() error + func New(i Interface, c *Config) (Service, error) + type Status byte + const StatusRunning + const StatusStopped + const StatusUnknown + type System interface + Detect func() bool + Interactive func() bool + New func(i Interface, c *Config) (Service, error) + String func() string + func AvailableSystems() []System + func ChosenSystem() System + type WindowsLogger struct — windows/amd64 + func (l WindowsLogger) Error(v ...interface{}) error + func (l WindowsLogger) Errorf(format string, a ...interface{}) error + func (l WindowsLogger) Info(v ...interface{}) error + func (l WindowsLogger) Infof(format string, a ...interface{}) error + func (l WindowsLogger) NError(eventID uint32, v ...interface{}) error + func (l WindowsLogger) NErrorf(eventID uint32, format string, a ...interface{}) error + func (l WindowsLogger) NInfo(eventID uint32, v ...interface{}) error + func (l WindowsLogger) NInfof(eventID uint32, format string, a ...interface{}) error + func (l WindowsLogger) NWarning(eventID uint32, v ...interface{}) error + func (l WindowsLogger) NWarningf(eventID uint32, format string, a ...interface{}) error + func (l WindowsLogger) Warning(v ...interface{}) error + func (l WindowsLogger) Warningf(format string, a ...interface{}) error