transport

package
v3.3.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2017 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBaggageclaimRoundTripper

func NewBaggageclaimRoundTripper(workerName string, baggageclaimURL *string, db TransportDB, innerRoundTripper http.RoundTripper) http.RoundTripper

func NewGardenRoundTripper

func NewGardenRoundTripper(workerName string, workerHost *string, db TransportDB, innerRoundTripper http.RoundTripper) http.RoundTripper

func NewHijackableClient

func NewHijackableClient(workerName string, db TransportDB, innerHijackableClient retryhttp.HijackableClient) retryhttp.HijackableClient

Types

type ReadCloser

type ReadCloser interface {
	Read(p []byte) (n int, err error)
	Close() error
}

type RequestGenerator

type RequestGenerator interface {
	CreateRequest(name string, params rata.Params, body io.Reader) (*http.Request, error)
}

type RoundTripper

type RoundTripper interface {
	RoundTrip(*http.Request) (*http.Response, error)
}

type TransportDB

type TransportDB interface {
	GetWorker(name string) (db.Worker, bool, error)
}

type UnreachableWorkerRetryer

type UnreachableWorkerRetryer struct {
	DelegateRetryer retryhttp.Retryer
}

func (*UnreachableWorkerRetryer) IsRetryable

func (r *UnreachableWorkerRetryer) IsRetryable(err error) bool

type WorkerHijackStreamer

type WorkerHijackStreamer struct {
	HttpClient       *http.Client
	HijackableClient retryhttp.HijackableClient
	Req              RequestGenerator
}

instead of httpClient defined in default Garden HijackStreamer

func (*WorkerHijackStreamer) Hijack

func (h *WorkerHijackStreamer) Hijack(handler string, body io.Reader, params rata.Params, query url.Values, contentType string) (net.Conn, *bufio.Reader, error)

func (*WorkerHijackStreamer) Stream

func (h *WorkerHijackStreamer) Stream(handler string, body io.Reader, params rata.Params, query url.Values, contentType string) (io.ReadCloser, error)

type WorkerMissingError

type WorkerMissingError struct {
	WorkerName string
}

func (WorkerMissingError) Error

func (e WorkerMissingError) Error() string

type WorkerUnreachableError

type WorkerUnreachableError struct {
	WorkerName  string
	WorkerState string
}

func (WorkerUnreachableError) Error

func (e WorkerUnreachableError) Error() string

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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