Documentation
¶
Index ¶
- type Proxy
- func (p *Proxy) AcceptRequest(ctx context.Context, uri string, body io.ReadCloser, buff *bytes.Buffer) error
- func (p *Proxy) AcceptResponse()
- func (p *Proxy) DispatchRequest(buff *bytes.Buffer) (*http.Response, error)
- func (p *Proxy) DispatchResponse()
- func (p *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request)
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 (*Proxy) AcceptResponse ¶
func (p *Proxy) AcceptResponse()
func (*Proxy) DispatchRequest ¶
func (*Proxy) DispatchResponse ¶
func (p *Proxy) DispatchResponse()
Click to show internal directories.
Click to hide internal directories.