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.
25 lines
775 B
Go
25 lines
775 B
Go
// Copyright (c) HashiCorp, Inc.
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
package winsvc
|
|
|
|
const (
|
|
WINDOWS_SERVICE_NAME = "nomad"
|
|
WINDOWS_SERVICE_DISPLAY_NAME = "HashiCorp Nomad"
|
|
WINDOWS_SERVICE_DESCRIPTION = "Workload scheduler and orchestrator - https://nomadproject.io"
|
|
WINDOWS_INSTALL_BIN_DIRECTORY = `{{.ProgramFiles}}\HashiCorp\nomad\bin`
|
|
WINDOWS_INSTALL_APPDATA_DIRECTORY = `{{.ProgramData}}\HashiCorp\nomad`
|
|
|
|
// Number of seconds to wait for a
|
|
// service to reach a desired state
|
|
WINDOWS_SERVICE_STATE_TIMEOUT = "1m"
|
|
)
|
|
|
|
var chanGraceExit = make(chan int)
|
|
|
|
// ShutdownChannel returns a channel that sends a message that a shutdown
|
|
// signal has been received for the service.
|
|
func ShutdownChannel() <-chan int {
|
|
return chanGraceExit
|
|
}
|