http

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Proxy

type Proxy struct {
	SchemaProvider     proxy.SchemaProvider
	Host               string
	InvokerPool        sync.Pool
	Client             http.Client
	HandleError        func(err error, w http.ResponseWriter)
	BufferPool         sync.Pool
	BufferedReaderPool sync.Pool
}

func NewDefaultProxy

func NewDefaultProxy(host string, provider proxy.SchemaProvider, middlewares ...middleware.GraphqlMiddleware) *Proxy

func (*Proxy) AcceptRequest

func (p *Proxy) AcceptRequest(ctx context.Context, uri string, body io.ReadCloser, buff *bytes.Buffer) error

func (*Proxy) AcceptResponse

func (p *Proxy) AcceptResponse()

func (*Proxy) DispatchRequest

func (p *Proxy) DispatchRequest(buff *bytes.Buffer) (*http.Response, error)

func (*Proxy) DispatchResponse

func (p *Proxy) DispatchResponse()

func (*Proxy) ServeHTTP

func (p *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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