Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMissingMethod = errors.New("Method not set") ErrMissingUrl = errors.New("Url not set") )
Functions ¶
func CloseStreams ¶
func CloseStreams(streams ...interface{})
func HijackHttpRequest ¶
func HijackHttpRequest(options HijackHttpOptions) error
HijackHttpRequest performs an HTTP request with given method, url and data and hijacks the request (after a successful connection) to stream data from/to the given input, output and error streams.
func HijackServer ¶
func HijackServer(w http.ResponseWriter) (io.ReadCloser, io.Writer, error)
Types ¶
type HijackHttpOptions ¶
type HijackHttpOptions struct { Method string Url string Host string // If set, this will be passed as `Host` header to the request. DockerTermProtocol bool InputStream io.Reader ErrorStream io.Writer OutputStream io.Writer Data interface{} Header http.Header Log docker.Logger ErrorHandler func(res *http.Response, err error) error }
Click to show internal directories.
Click to hide internal directories.