Documentation ¶
Index ¶
- func SvcStateString(s svc.State) string
- type CPUVitals
- type JobFailureHandler
- type JobSupervisor
- func NewDummyJobSupervisor() JobSupervisor
- func NewDummyNatsJobSupervisor(mbusHandler boshhandler.Handler) JobSupervisor
- func NewMonitJobSupervisor(fs boshsys.FileSystem, runner boshsys.CmdRunner, client boshmonit.Client, ...) JobSupervisor
- func NewWindowsJobSupervisor(cmdRunner boshsys.CmdRunner, dirProvider boshdirs.Provider, ...) JobSupervisor
- type MemoryVitals
- type MonitReloadOptions
- type Process
- type Provider
- type StopCommand
- type UptimeVitals
- type WindowsProcess
- type WindowsProcessConfig
- type WindowsServiceWrapperConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SvcStateString ¶
Types ¶
type JobFailureHandler ¶
type JobFailureHandler func(boshalert.MonitAlert) error
type JobSupervisor ¶
type JobSupervisor interface { Reload() error // Actions taken on all services Start() error Stop() error StopAndWait() error // Start and Stop should still function after Unmonitor. // Calling Start after Unmonitor should re-monitor all jobs. // Calling Stop after Unmonitor should not re-monitor all jobs. // (Monit complies to above requirements.) Unmonitor() error Status() string Processes() ([]Process, error) // Job management AddJob(jobName string, jobIndex int, configPath string) error RemoveAllJobs() error MonitorJobFailures(handler JobFailureHandler) error }
func NewDummyJobSupervisor ¶
func NewDummyJobSupervisor() JobSupervisor
func NewDummyNatsJobSupervisor ¶
func NewDummyNatsJobSupervisor(mbusHandler boshhandler.Handler) JobSupervisor
func NewMonitJobSupervisor ¶
func NewMonitJobSupervisor( fs boshsys.FileSystem, runner boshsys.CmdRunner, client boshmonit.Client, logger boshlog.Logger, dirProvider boshdir.Provider, jobFailuresServerPort int, reloadOptions MonitReloadOptions, timeService clock.Clock, ) JobSupervisor
func NewWindowsJobSupervisor ¶
type MemoryVitals ¶
type MonitReloadOptions ¶
type MonitReloadOptions struct { // Number of times `monit reload` will be executed MaxTries int // Number of times monit incarnation will be checked // for difference after executing `monit reload` MaxCheckTries int // Length of time between checking for incarnation difference DelayBetweenCheckTries time.Duration }
type Process ¶
type Process struct { Name string `json:"name"` State string `json:"state"` Uptime UptimeVitals `json:"uptime,omitempty"` Memory MemoryVitals `json:"mem,omitempty"` CPU CPUVitals `json:"cpu,omitempty"` }
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func NewProvider ¶
type StopCommand ¶ added in v0.0.41
type UptimeVitals ¶
type UptimeVitals struct {
Secs int `json:"secs,omitempty"`
}
type WindowsProcess ¶
type WindowsProcess struct { Name string `json:"name"` Executable string `json:"executable"` Args []string `json:"args"` Env map[string]string `json:"env"` Stop *StopCommand `json:"stop,omitempty"` }
func (*WindowsProcess) ServiceWrapperConfig ¶
func (p *WindowsProcess) ServiceWrapperConfig(logPath string, eventPort int, machineIP string) *WindowsServiceWrapperConfig
type WindowsProcessConfig ¶
type WindowsProcessConfig struct {
Processes []WindowsProcess `json:"processes"`
}
type WindowsServiceWrapperConfig ¶
type WindowsServiceWrapperConfig struct { XMLName xml.Name `xml:"service"` ID string `xml:"id"` Name string `xml:"name"` Description string `xml:"description"` // Start exe and args if no stop arguments are provided Executable string `xml:"executable"` Arguments []string `xml:"argument"` // Optional stop arguments StopExecutable string `xml:"stopexecutable,omitempty"` StopArguments []string `xml:"stopargument"` // Replaces Arguments if stop arguments are provided StartArguments []string `xml:"startargument"` LogPath string `xml:"logpath"` LogMode serviceLogMode `xml:"log"` Onfailure serviceOnfailure `xml:"onfailure"` Env []serviceEnv `xml:"env,omitempty"` StopParentProcessFirst bool `xml:"stopparentprocessfirst,omitempty"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.