mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
Provides interfaces to the Windows service manager and Windows services. These interfaces support creating new Windows services, deleting Windows services, configuring Windows services, and registering/deregistering services with Windows Eventlog. A path helper is included to support expansion of paths using a subset of known folder IDs. A privileged helper is included to check that the process is currently being executed with elevated privileges, which are required for managing Windows services and modifying the registry.
23 lines
500 B
Go
23 lines
500 B
Go
// Copyright (c) HashiCorp, Inc.
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
//go:build !windows
|
|
|
|
package winsvc
|
|
|
|
import "errors"
|
|
|
|
func NewWindowsPaths() WindowsPaths {
|
|
return &windowsPaths{}
|
|
}
|
|
|
|
type windowsPaths struct{}
|
|
|
|
func (w *windowsPaths) Expand(string) (string, error) {
|
|
return "", errors.New("Windows path expansion not supported on this platform")
|
|
}
|
|
|
|
func (w *windowsPaths) CreateDirectory(string, bool) error {
|
|
return errors.New("Windows directory creation not supported on this platform")
|
|
}
|