transport

package
v1.3.0-alpha.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2016 License: Apache-2.0, Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package transport provides function to send request to remote endpoints.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Sender
	// Secure tells whether the connection is secure or not.
	Secure() bool
	// Scheme returns the connection protocol the client uses.
	Scheme() string
	// TLSConfig returns any TLS configuration the client uses.
	TLSConfig() *tls.Config
}

Client is an interface that abstracts all remote connections.

func NewTransportWithHTTP

func NewTransportWithHTTP(proto, addr string, client *http.Client) (Client, error)

NewTransportWithHTTP creates a new transport based on the provided proto, address and http client. It uses Docker's default http transport configuration if the client is nil. It does not modify the client's transport if it's not nil.

type Sender

type Sender interface {
	// Do sends request to a remote endpoint.
	Do(*http.Request) (*http.Response, error)
}

Sender is an interface that clients must implement to be able to send requests to a remote connection.

Directories

Path Synopsis
Package cancellable provides helper function to cancel http requests.
Package cancellable provides helper function to cancel http requests.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL