kubernetes.v0: gopkg.in/kubernetes/kubernetes.v0/pkg/probe/http Index | Files

package http

import "gopkg.in/kubernetes/kubernetes.v0/pkg/probe/http"


Package Files


func DoHTTPProbe Uses

func DoHTTPProbe(url *url.URL, client HTTPGetInterface) (probe.Result, string, error)

DoHTTPProbe checks if a GET request to the url succeeds. 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. This is exported because some other packages may want to do direct HTTP probes.

type HTTPGetInterface Uses

type HTTPGetInterface interface {
    Get(u string) (*http.Response, error)

type HTTPProber Uses

type HTTPProber interface {
    Probe(url *url.URL, timeout time.Duration) (probe.Result, string, error)

func New Uses

func New() HTTPProber

Package http imports 7 packages (graph). Updated 2018-04-01. Refresh now. Tools for package owners.