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

Method Check

check/exec/exec.go:83–94  ·  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

81// Check performs checks using c according to its configuration.
82// An error is only returned if there is a configuration error.
83func (c Checker) Check() (types.Result, error) {
84 if c.Attempts < 1 {
85 c.Attempts = 1
86 }
87
88 result := types.NewResult()
89 result.Title = c.Name
90 result.Endpoint = c.Command
91 result.Times = c.doChecks()
92
93 return c.conclude(result), nil
94}
95
96// doChecks executes command and returns each attempt.
97func (c Checker) doChecks() types.Attempts {

Callers 1

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 1

TestCheckerFunction · 0.76