prober: rename Probe to ProbeFunc.

Making way for a future Probe struct to encapsulate per-probe state.

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson
2022-03-19 20:58:35 -07:00
committed by Dave Anderson
parent 7b4960316b
commit 94aaec5c66
4 changed files with 12 additions and 12 deletions

View File

@ -16,11 +16,11 @@ const maxHTTPBody = 4 << 20 // MiB
// HTTP returns a Probe that healthchecks an HTTP URL.
//
// The Probe sends a GET request for url, expects an HTTP 200
// The ProbeFunc sends a GET request for url, expects an HTTP 200
// response, and verifies that want is present in the response
// body. If the URL is HTTPS, the probe further checks that the TLS
// certificate is good for at least the next 7 days.
func HTTP(url, wantText string) Probe {
func HTTP(url, wantText string) ProbeFunc {
return func(ctx context.Context) error {
return probeHTTP(ctx, url, []byte(wantText))
}