Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AgentParams ¶
type AgentParams struct {
Name string
AgentExecutablePath string
OrgId string
ConfigFilePath string
LogFilePath string
// ServiceUsername, when non-empty, registers the service to run as the
// given account instead of the platform default (LocalSystem on Windows,
// root on Linux/macOS).
ServiceUsername string
// ServicePassword is the password for ServiceUsername on Windows. It is
// only consulted at service registration time and must never be persisted
// to disk. Linux and macOS service managers ignore it.
ServicePassword string
}
type Runner ¶
type Runner interface {
Name() string
Execute(stop <-chan struct{}, running chan<- struct{}) ServiceExitCode
}
type ServiceExitCode ¶ added in v0.9.0
type ServiceExitCode int
const ( GenericError ServiceExitCode = 1 ConfigError ServiceExitCode = 2 LogFileError ServiceExitCode = 3 )
type ServiceManager ¶ added in v1.0.0
type ServiceManager interface {
Create(params AgentParams) (Service, error)
Open(name string) (Service, error)
}
func NewServiceManager ¶ added in v1.0.0
func NewServiceManager() ServiceManager
Click to show internal directories.
Click to hide internal directories.