Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpProber ¶
type HttpProber struct {
// contains filtered or unexported fields
}
func NewHTTPProber ¶
func NewHTTPProber() HttpProber
New creates Prober that will skip TLS verification while probing.
func NewWithTLSConfig ¶
func NewWithTLSConfig(config *tls.Config) HttpProber
func (HttpProber) Probe ¶
func (pr HttpProber) Probe(url *url.URL, headers http.Header, timeout time.Duration) (ProbeResult, string, error)
Probe returns a ProbeRunner capable of running an HTTP check. If the HTTP response code is successful (i.e. 400 > code >= 200), it returns Success. If the HTTP response code is unsuccessful or HTTP communication fails, it returns Failure.
type ProbeResult ¶
type ProbeResult string
const ( Success ProbeResult = "success" Warning ProbeResult = "warning" Failure ProbeResult = "failure" Unknown ProbeResult = "unknown" )
Click to show internal directories.
Click to hide internal directories.