Documentation ¶
Rendered for windows/amd64
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNameFieldRequired is returned when Config.Name is empty. ErrNameFieldRequired = errors.New("Config.Name field is required.") // ErrNoServiceSystemDetected is returned when no system was detected. ErrNoServiceSystemDetected = errors.New("No service system detected.") // ErrNotInstalled is returned when the service is not installed ErrNotInstalled = errors.New("the service is not installed") )
Functions ¶
func ServiceInstall ¶
func ServiceStart ¶
func ServiceStop ¶
func ServiceUninstall ¶
Types ¶
type WindowsService ¶
type WindowsService struct { Name string // contains filtered or unexported fields }
func NewService ¶
func NewService(i Interface, name string) (*WindowsService, error)
func (*WindowsService) Execute ¶
func (ws *WindowsService) Execute(args []string, r <-chan svc.ChangeRequest, changes chan<- svc.Status) (bool, uint32)
func (*WindowsService) Run ¶
func (ws *WindowsService) Run(isDebug bool) error
Notes ¶
Bugs ¶
MessageBeep Windows api is broken on Windows 7, so this example does not beep when runs as service on Windows 7.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.