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

Method Check

check/dns/dns.go:54–65  ·  view source on GitHub ↗

Check performs checks using c according to its configuration. An error is only returned if there is a configuration error.

()

Source from the content-addressed store, hash-verified

52// Check performs checks using c according to its configuration.
53// An error is only returned if there is a configuration error.
54func (c Checker) Check() (types.Result, error) {
55 if c.Attempts < 1 {
56 c.Attempts = 1
57 }
58
59 result := types.NewResult()
60 result.Title = c.Name
61 result.Endpoint = c.URL
62 result.Times = c.doChecks()
63
64 return c.conclude(result), nil
65}
66
67// doChecks executes and returns each attempt.
68func (c Checker) doChecks() types.Attempts {

Callers 2

TestCheckerFunction · 0.95

Implementers 6

fakecheckup_test.go
Checkercheck/http/http.go
Checkercheck/dns/dns.go
Checkercheck/exec/exec.go
Checkercheck/tls/tls.go
Checkercheck/tcp/tcp.go

Calls 3

doChecksMethod · 0.95
concludeMethod · 0.95
NewResultFunction · 0.92

Tested by 2

TestCheckerFunction · 0.76