Documentation
¶
Index ¶
Constants ¶
View Source
const ( ServiceCheck ServiceCommandTypeEnum = "Check" ServiceStart = "Start" ServiceStop = "Stop" ServiceRestart = "Restart" )
View Source
const ( OpEq OpEnum = "eq" OpNeq = "ne" OpContains = "contains" OpNotContains = "notcontains" )
View Source
const ( ServiceNotifStop ServiceNotifEnum = "Service Stop" ServiceNotifRestart = "Service Restart" ServiceNotifFail = "Service Fail" )
Variables ¶
This section is empty.
Functions ¶
func CmdToStrings ¶
Types ¶
type Command ¶
type Command struct {
CommandType CommandTypeEnum
//Function ServiceCommandTypeEnum
Txt string
Op OpEnum
Expected string
CaseSensitive bool
}
type CommandTypeEnum ¶
type CommandTypeEnum string
const ( CommandLine CommandTypeEnum = "Cmd" CommandUrl = "Url" )
type Context ¶
type Context struct {
Port int
Verbose bool
Services map[string]*Service
SmtpClient *SmtpClient
LogToFile bool
LogPath string
// contains filtered or unexported fields
}
func (*Context) StartWebConsole ¶
func (c *Context) StartWebConsole()
type Service ¶
type Service struct {
Commands map[string]Command
Interval time.Duration
NotifyInterval time.Duration
CheckAgainAfter time.Duration
NotifyTo []string
StopNotifyAfter int
StopStartAfter int
Active bool
// contains filtered or unexported fields
}
func (*Service) StartMonitor ¶
func (s *Service) StartMonitor()
func (*Service) StopMonitor ¶
func (s *Service) StopMonitor()
type ServiceCommandTypeEnum ¶
type ServiceCommandTypeEnum string
type ServiceNotifEnum ¶
type ServiceNotifEnum string
Click to show internal directories.
Click to hide internal directories.