Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Conf ¶
type Conf struct { // Desc is the init service's description. Desc string // Transient indicates whether or not the service is a one-off. Transient bool // AfterStopped is the name, if any, of another service. This // service will not start until after the other stops. AfterStopped string // Env holds the environment variables that will be set when the // command runs. // Currently not used on Windows. Env map[string]string // Limit holds the ulimit values that will be set when the command // runs. Each value will be used as both the soft and hard limit. // Currently not used on Windows. Limit map[string]int // Timeout is how many seconds may pass before an exec call (e.g. // ExecStart) times out. Values less than or equal to 0 (the // default) are treated as though there is no timeout. Timeout int // ExecStart is the command (with arguments) that will be run. The // path to the executable must be absolute. // The command will be restarted if it exits with a non-zero exit code. ExecStart string // ExecStopPost is the command that will be run after the service stops. // The path to the executable must be absolute. ExecStopPost string // Logfile, if set, indicates where the service's output should be // written. Logfile string // ExtraScript allows to insert script before command execution. ExtraScript string // ServiceBinary is the actual binary without any arguments. ServiceBinary string // ServiceArgs is a string array of unquoted arguments ServiceArgs []string }
Conf is responsible for defining services. Its fields represent elements of a service configuration.
type Service ¶
type Service struct { // Name is the name of the service. Name string // Conf holds the info used to build an init system conf. Conf Conf }
Service is the base type for service.Service implementations.
func (*Service) UpdateConfig ¶
UpdateConfig implements service.Service.
Click to show internal directories.
Click to hide internal directories.