transport

package
v0.0.0-...-484f906 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHijackableClient

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

func NewRoundTripper

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

Types

type ErrMissingWorker

type ErrMissingWorker struct {
	WorkerName string
}

func (ErrMissingWorker) Error

func (e ErrMissingWorker) Error() string

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(string) (db.SavedWorker, bool, error)
}

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)

Directories

Path Synopsis
This file was generated by counterfeiter
This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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