Documentation ¶
Index ¶
Constants ¶
View Source
const ( // RestartNever indicates to never restart the process RestartNever = RestartPolicy("never") // RestartOnFailure indicates to only restart the process after failures RestartOnFailure = RestartPolicy("on_failure") // RestartAlways indicates to always restart the process RestartAlways = RestartPolicy("always") )
Variables ¶
This section is empty.
Functions ¶
func ParseOption ¶
func ParseOption(c *caddy.Controller, options *Options)
ParseOption parses supervisor options
Types ¶
type Options ¶
type Options struct { Replicas int Command string Args []string Dir string Env []string RedirectStdout string RedirectStderr string RestartPolicy RestartPolicy TerminationGracePeriod time.Duration }
Options exposes settings to create a process supervisor
func CreateOptions ¶
func CreateOptions() *Options
CreateOptions createnew SupervisorOptions with default settings
type RestartPolicy ¶
type RestartPolicy string
RestartPolicy determines when a supervised process should be restarted
type Supervisor ¶
type Supervisor struct {
// contains filtered or unexported fields
}
Supervisor provides functionality to start and supervise a background process
func CreateSupervisors ¶ added in v0.1.1
func CreateSupervisors(options *Options) []*Supervisor
CreateSupervisors creates a new process supervisor
type TemplateData ¶ added in v0.1.1
type TemplateData struct {
Replica int
}
TemplateData contains data to be accessed from templates
Click to show internal directories.
Click to hide internal directories.