Documentation ¶
Index ¶
- type Conf
- type HttpSite
- type Site
- type SiteCheck
- type SiteChecker
- func (sc *SiteChecker) AddSite(name string, site Site)
- func (sc *SiteChecker) CheckAll() error
- func (sc *SiteChecker) CheckOne(name string) error
- func (sc *SiteChecker) CheckOneDuration(name string, totalSecond int, intervalSecond int) bool
- func (sc *SiteChecker) MonitorAll()
- func (sc *SiteChecker) MonitorOne(name string)
- func (sc *SiteChecker) ReadConfig(yamlFile string) error
- func (sc *SiteChecker) Summary(displayType string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conf ¶
type Conf struct { //TcpSites []*TcpSite `yaml:"tcp_sites"` //UdpSites []*UdpSite `yaml:"udp_sites"` // //PingSites []*PingSite `yaml:"ping_sites"` HttpSites []*HttpSite `yaml:"http_sites"` }
type HttpSite ¶
type HttpSite struct { Name string `yaml:"name"` SiteAddress string `yaml:"site_address"` ApiName string `yaml:"api_name"` MonitorResult *models.MonitorResult Method string `yaml:"method"` Headers []string `yaml:"headers"` IsMtls bool `yaml:"is_mtls"` CertPath string `yaml:"cert_path"` KeyPath string `yaml:"key_path"` IsUseRegexp bool `yaml:"is_use_regexp"` ContainRegexpContent string `yaml:"contain_regexp_content"` ExcludeRegexpContent string `yaml:"exclude_regexp_content"` }
func (*HttpSite) CheckResult ¶
func (*HttpSite) DingdingContent ¶
func (*HttpSite) DisplayResult ¶
func (hs *HttpSite) DisplayResult()
func (*HttpSite) LinuxContent ¶
func (*HttpSite) MonitorOnce ¶
func (hs *HttpSite) MonitorOnce()
type SiteCheck ¶
type SiteCheck interface { //增加站点 AddSite(name string, site Site) //批量监控 MonitorAll() //单独监控某个 MonitorOne(name string) // ReadConfig(yamlFile string) error // Summary(displayType string) (string, error) // CheckAll() error // CheckOne(name string) error // CheckOneDuration(name string, totalSecond int, intervalSecond int) bool }
func NewSiteChecker ¶
func NewSiteChecker() SiteCheck
type SiteChecker ¶
func (*SiteChecker) AddSite ¶
func (sc *SiteChecker) AddSite(name string, site Site)
func (*SiteChecker) CheckAll ¶
func (sc *SiteChecker) CheckAll() error
func (*SiteChecker) CheckOne ¶
func (sc *SiteChecker) CheckOne(name string) error
func (*SiteChecker) CheckOneDuration ¶
func (sc *SiteChecker) CheckOneDuration(name string, totalSecond int, intervalSecond int) bool
func (*SiteChecker) MonitorAll ¶
func (sc *SiteChecker) MonitorAll()
func (*SiteChecker) MonitorOne ¶
func (sc *SiteChecker) MonitorOne(name string)
func (*SiteChecker) ReadConfig ¶
func (sc *SiteChecker) ReadConfig(yamlFile string) error
Click to show internal directories.
Click to hide internal directories.