Documentation
¶
Index ¶
- Constants
- type Check
- type Checks
- type Destination
- type Instance
- type KV
- type Mon
- func (m *Mon) DNS(addr netip.Addr, port uint16, useTCP bool) (bool, string)
- func (m *Mon) Dump() map[Instance]Status
- func (m *Mon) HTTP(addr netip.Addr, port uint16, https bool, head bool, host, path string, ...) (bool, string)
- func (m *Mon) Probe(vip, addr netip.Addr, c Check) (ok bool, s string)
- func (m *Mon) Probes(vip, rip netip.Addr, port uint16, checks Checks) (bool, string)
- func (m *Mon) SYN(addr netip.Addr, port uint16) (bool, string)
- func (m *Mon) Status(svc Service, dst Destination) (status Status, _ bool)
- func (m *Mon) Stop()
- func (m *Mon) Update(checks map[Instance]Target)
- type Prober
- type SYN
- type Service
- type Services
- type Status
- type SynChecks
- type Target
Constants ¶
View Source
const ( GET method = false HEAD method = true UDP method = false TCP method = true )
View Source
const F = "mon"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Check ¶
type Check struct {
// Type of check; http, https, syn, dns
Type string `json:"type,omitempty"`
// TCP/UDP port to use for L4/L7 checks
Port uint16 `json:"port,omitempty"`
// HTTP Host header to send in healthcheck
Host string `json:"host,omitempty"`
// Path of resource to use when building a URI for HTTP/HTTPS healthchecks
Path string `json:"path,omitempty"`
// Expected HTTP status codes to allow check to succeed
Expect []int `json:"expect,omitempty"`
// Method - HTTP: GET=false, HEAD=true DNS: UDP=false TCP=true
Method method `json:"method,omitempty"`
}
type Destination ¶
type Instance ¶
type Instance struct {
Service Service
Destination Destination
}
type Mon ¶
type Mon struct {
C chan bool
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.