Documentation
¶
Index ¶
- func ConnectToService(name string) (*mgr.Service, error)
- func Continue(name string, waitTime time.Duration) error
- func InstallService(name string, exepath string, cfg mgr.Config, options ...Option) error
- func Pause(name string, waitTime time.Duration) error
- func RemoveService(name string) error
- func SendCommand(name string, c svc.Cmd, to svc.State, waitTime time.Duration) error
- func Start(name string, waitTime time.Duration, args ...string) error
- func Stop(name string, waitTime time.Duration) error
- func WaitForState(s *mgr.Service, to svc.State, waitTime time.Duration) error
- type ChangeHandlerFunc
- type HandlerFunc
- type Option
- type Service
- func (s *Service) Execute(args []string, r <-chan svc.ChangeRequest, changes chan<- svc.Status) (ssec bool, errno uint32)
- func (s *Service) RegisterChangeHandler(cmd svc.Cmd, f ChangeHandlerFunc)
- func (s *Service) Run(args ...string) error
- func (s *Service) SendAccepts(accepts svc.Accepted)
- func (s *Service) SendState(state svc.State)
- func (s *Service) SendStatus(status svc.Status)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InstallService ¶ added in v1.3.0
func RemoveService ¶ added in v1.3.0
func SendCommand ¶ added in v1.3.0
Types ¶
type ChangeHandlerFunc ¶
type ChangeHandlerFunc func(s *Service, c svc.ChangeRequest)
type HandlerFunc ¶ added in v1.3.0
type Option ¶ added in v1.3.0
type Option struct {
// contains filtered or unexported fields
}
func ArgsOption ¶ added in v1.3.0
func DelayedAutostartOption ¶ added in v1.3.0
func DelayedAutostartOption() Option
func FailureActionsOption ¶ added in v1.3.0
func FailureActionsOption(failureActions windows.SERVICE_FAILURE_ACTIONS) Option
func PreShutdownOption ¶ added in v1.3.0
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func ServiceHandler ¶ added in v1.3.0
func ServiceHandler(name string, handlerFunc HandlerFunc) *Service
func (*Service) RegisterChangeHandler ¶ added in v1.3.0
func (s *Service) RegisterChangeHandler(cmd svc.Cmd, f ChangeHandlerFunc)
func (*Service) SendAccepts ¶ added in v1.3.0
func (*Service) SendStatus ¶ added in v1.3.0
Click to show internal directories.
Click to hide internal directories.