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:

committed by
Dave Anderson

parent
7b4960316b
commit
94aaec5c66
@ -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))
|
||||
}
|
||||
|
Reference in New Issue
Block a user