Documentation
¶
Index ¶
- Variables
- type CheckResult
- type Watcher
- func (w *Watcher) AddContinueErrorTimes()
- func (w *Watcher) BeforeCreate(_ *gorm.DB) (err error)
- func (w *Watcher) GetContinueErrorTimes() int
- func (w *Watcher) GetCronExpression() string
- func (w *Watcher) GetCronExpressionWithContinuesErrorTimes() string
- func (w *Watcher) GetCronID() cron.EntryID
- func (w *Watcher) GetLastStatus() bool
- func (w *Watcher) RemoveContinueErrorTimes()
- func (w *Watcher) RemoveCronID()
- func (w *Watcher) RemoveLastStatus()
- func (w *Watcher) SetCronID(id cron.EntryID)
- func (w *Watcher) SetLastStatus(b bool)
Constants ¶
This section is empty.
Variables ¶
View Source
var CronScheduledMap map[string]cron.EntryID
View Source
var WatcherContinueErrorTimesMap map[string]int
View Source
var WatcherLastStatusMap map[string]bool
Functions ¶
This section is empty.
Types ¶
type CheckResult ¶
type Watcher ¶
type Watcher struct { ID string `gorm:"primaryKey"` Type enums.WatcherType `json:"type"` // Type of the watcher Name string `json:"name" validate:"required"` Location string `json:"location" validate:"required,url"` // URL or IP Interval int `json:"interval" validate:"required,min=10"` // Interval to check the service IsEnable bool `json:"is_enable"` // Enable or disable the watcher }
func (*Watcher) AddContinueErrorTimes ¶
func (w *Watcher) AddContinueErrorTimes()
func (*Watcher) BeforeCreate ¶
BeforeCreate will set snowflake id rather than numeric id.
func (*Watcher) GetContinueErrorTimes ¶
func (*Watcher) GetCronExpression ¶
func (*Watcher) GetCronExpressionWithContinuesErrorTimes ¶
func (*Watcher) GetLastStatus ¶
func (*Watcher) RemoveContinueErrorTimes ¶ added in v1.0.1
func (w *Watcher) RemoveContinueErrorTimes()
func (*Watcher) RemoveCronID ¶ added in v1.0.1
func (w *Watcher) RemoveCronID()
func (*Watcher) RemoveLastStatus ¶ added in v1.0.1
func (w *Watcher) RemoveLastStatus()
func (*Watcher) SetLastStatus ¶
Click to show internal directories.
Click to hide internal directories.