diff options
| author | Paul Buetow <paul@buetow.org> | 2025-06-01 15:00:59 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-06-01 15:00:59 +0300 |
| commit | 9fe227b79ea15ffcde8bf175ff879f991d183eab (patch) | |
| tree | b033237472a35e60074591e8788ee99c7c5630cc /internal/check.go | |
| parent | 075ddd7ecec4ab3f0648015857e32c3bb5240743 (diff) | |
more on federation
Diffstat (limited to 'internal/check.go')
| -rw-r--r-- | internal/check.go | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/internal/check.go b/internal/check.go index 55b740a..70f0044 100644 --- a/internal/check.go +++ b/internal/check.go @@ -22,10 +22,11 @@ type namedCheck struct { } type checkResult struct { - name string - output string - epoch int64 - status nagiosCode + name string + output string + epoch int64 + status nagiosCode + federated bool } func (c check) run(ctx context.Context, name string) checkResult { @@ -37,7 +38,7 @@ func (c check) run(ctx context.Context, name string) checkResult { if err := cmd.Run(); err != nil { if ctx.Err() == context.DeadlineExceeded { - return checkResult{name, "Check command timed out", time.Now().Unix(), nagiosCritical} + return checkResult{name, "Check command timed out", time.Now().Unix(), nagiosCritical, false} } } @@ -51,11 +52,11 @@ func (c check) run(ctx context.Context, name string) checkResult { ec = int(nagiosUnknown) } - return checkResult{name, output, time.Now().Unix(), nagiosCode(ec)} + return checkResult{name, output, time.Now().Unix(), nagiosCode(ec), false} } func (c check) skip(name, output string) checkResult { - return checkResult{name, output, time.Now().Unix(), nagiosUnknown} + return checkResult{name, output, time.Now().Unix(), nagiosUnknown, false} } func (c namedCheck) run(ctx context.Context) checkResult { |
