MCPcopy
hub / github.com/sourcegraph/checkup / Checker

Struct Checker

check/dns/dns.go:18–38  ·  view source on GitHub ↗

Checker implements a Checker for TCP endpoints.

Source from the content-addressed store, hash-verified

16
17// Checker implements a Checker for TCP endpoints.
18type Checker struct {
19 // Name is the name of the endpoint.
20 Name string `json:"endpoint_name"`
21 // This is the name of the DNS server you are testing.
22 URL string `json:"endpoint_url"`
23 // This is the fqdn of the target server to query the DNS server for.
24 Host string `json:"hostname_fqdn,omitempty"`
25 // Timeout is the maximum time to wait for a
26 // TCP connection to be established.
27 Timeout time.Duration `json:"timeout,omitempty"`
28 // ThresholdRTT is the maximum round trip time to
29 // allow for a healthy endpoint. If non-zero and a
30 // request takes longer than ThresholdRTT, the
31 // endpoint will be considered unhealthy. Note that
32 // this duration includes any in-between network
33 // latency.
34 ThresholdRTT time.Duration `json:"threshold_rtt,omitempty"`
35 // Attempts is how many requests the client will
36 // make to the endpoint in a single check.
37 Attempts int `json:"attempts,omitempty"`
38}
39
40// New creates a new Checker instance based on json config
41func New(config json.RawMessage) (Checker, error) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected