Documentation ¶
Overview ¶
Package base is the base package for all probes
Index ¶
- Constants
- type DefaultProbe
- func (d *DefaultProbe) Channels() []string
- func (d *DefaultProbe) CheckStatusThreshold() probe.Status
- func (d *DefaultProbe) Config(gConf global.ProbeSettings, kind, tag, name, endpoint string, fn ProbeFuncType) error
- func (d *DefaultProbe) DownTimeCalculation(status probe.Status)
- func (d *DefaultProbe) ExportMetrics()
- func (d *DefaultProbe) GetProxyConnection(socks5 string, host string) (net.Conn, error)
- func (d *DefaultProbe) Interval() time.Duration
- func (d *DefaultProbe) Kind() string
- func (d *DefaultProbe) LogTitle() string
- func (d *DefaultProbe) Name() string
- func (d *DefaultProbe) Probe() probe.Result
- func (d *DefaultProbe) Result() *probe.Result
- func (d *DefaultProbe) Timeout() time.Duration
- type ProbeFuncType
Constants ¶
View Source
const ( ServiceUp int = 1 ServiceDown int = 0 )
Probe Simple Status
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultProbe ¶ added in v1.6.0
type DefaultProbe struct { ProbeKind string `yaml:"-" json:"-"` ProbeTag string `yaml:"-" json:"-"` ProbeName string `yaml:"name" json:"name" jsonschema:"required,title=Probe Name,description=the name of probe must be unique"` ProbeChannels []string `` /* 133-byte string literal not displayed */ ProbeTimeout time.Duration `` /* 143-byte string literal not displayed */ ProbeTimeInterval time.Duration `` /* 147-byte string literal not displayed */ global.StatusChangeThresholdSettings `yaml:",inline" json:",inline"` ProbeFunc ProbeFuncType `yaml:"-" json:"-"` ProbeResult *probe.Result `yaml:"-" json:"-"` // contains filtered or unexported fields }
DefaultProbe is the default options for all probe
func (*DefaultProbe) Channels ¶ added in v1.6.0
func (d *DefaultProbe) Channels() []string
Channels return the probe channels
func (*DefaultProbe) CheckStatusThreshold ¶ added in v1.9.0
func (d *DefaultProbe) CheckStatusThreshold() probe.Status
CheckStatusThreshold check the status threshold
func (*DefaultProbe) Config ¶ added in v1.6.0
func (d *DefaultProbe) Config(gConf global.ProbeSettings, kind, tag, name, endpoint string, fn ProbeFuncType) error
Config default config
func (*DefaultProbe) DownTimeCalculation ¶ added in v1.6.0
func (d *DefaultProbe) DownTimeCalculation(status probe.Status)
DownTimeCalculation calculate the down time
func (*DefaultProbe) ExportMetrics ¶ added in v1.6.0
func (d *DefaultProbe) ExportMetrics()
ExportMetrics export the metrics
func (*DefaultProbe) GetProxyConnection ¶ added in v1.8.0
GetProxyConnection return the proxy connection
func (*DefaultProbe) Interval ¶ added in v1.6.0
func (d *DefaultProbe) Interval() time.Duration
Interval get the probe interval
func (*DefaultProbe) Kind ¶ added in v1.6.0
func (d *DefaultProbe) Kind() string
Kind return the probe kind
func (*DefaultProbe) LogTitle ¶ added in v1.9.0
func (d *DefaultProbe) LogTitle() string
LogTitle return the log title
func (*DefaultProbe) Name ¶ added in v1.6.0
func (d *DefaultProbe) Name() string
Name return the probe name
func (*DefaultProbe) Probe ¶ added in v1.6.0
func (d *DefaultProbe) Probe() probe.Result
Probe return the checking result
func (*DefaultProbe) Result ¶ added in v1.6.0
func (d *DefaultProbe) Result() *probe.Result
Result get the probe result
func (*DefaultProbe) Timeout ¶ added in v1.6.0
func (d *DefaultProbe) Timeout() time.Duration
Timeout get the probe timeout
type ProbeFuncType ¶
ProbeFuncType is the probe function type
Click to show internal directories.
Click to hide internal directories.