Documentation
¶
Index ¶
- type FastHttpProxy
- type FastStaticProxy
- type FastStaticProxyConfig
- type GraphqlJsonRequest
- type Proxy
- func (p *Proxy) AcceptRequest(userValues map[string][]byte, requestURI []byte, body io.Reader, ...) 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)
- type StaticProxy
- type StaticProxyConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FastHttpProxy ¶ added in v1.4.0
type FastHttpProxy struct {
// contains filtered or unexported fields
}
func (*FastHttpProxy) HandleRequest ¶ added in v1.4.0
func (f *FastHttpProxy) HandleRequest(ctx *fasthttp.RequestCtx)
func (*FastHttpProxy) RewriteQuery ¶ added in v1.4.0
func (f *FastHttpProxy) RewriteQuery(config proxy.RequestConfig, userValues map[string][]byte, requestURI []byte, query []byte, out io.Writer) error
func (*FastHttpProxy) SetUserValues ¶ added in v1.4.0
func (f *FastHttpProxy) SetUserValues(userValues *map[string][]byte, header fasthttp.RequestHeader, addHeaders [][]byte)
type FastStaticProxy ¶ added in v1.4.0
type FastStaticProxy struct {
// contains filtered or unexported fields
}
func NewFastStaticProxy ¶ added in v1.4.0
func NewFastStaticProxy(config FastStaticProxyConfig) *FastStaticProxy
func (*FastStaticProxy) ListenAndServe ¶ added in v1.4.0
func (f *FastStaticProxy) ListenAndServe(addr string) error
type FastStaticProxyConfig ¶ added in v1.4.0
type FastStaticProxyConfig struct {
MiddleWares []middleware.GraphqlMiddleware
RequestConfigProvider proxy.RequestConfigProvider
}
type GraphqlJsonRequest ¶ added in v1.4.0
type Proxy ¶
type Proxy struct {
RequestConfigProvider proxy.RequestConfigProvider
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.RequestConfigProvider, middlewares ...middleware.GraphqlMiddleware) *Proxy
func (*Proxy) AcceptRequest ¶
func (*Proxy) AcceptResponse ¶
func (p *Proxy) AcceptResponse()
func (*Proxy) DispatchRequest ¶
func (*Proxy) DispatchResponse ¶
func (p *Proxy) DispatchResponse()
type StaticProxy ¶ added in v1.4.0
type StaticProxy struct {
// contains filtered or unexported fields
}
func NewStaticProxy ¶ added in v1.4.0
func NewStaticProxy(config StaticProxyConfig) *StaticProxy
func (*StaticProxy) ListenAndServe ¶ added in v1.4.0
func (s *StaticProxy) ListenAndServe(addr string) error
type StaticProxyConfig ¶ added in v1.4.0
type StaticProxyConfig struct {
MiddleWares []middleware.GraphqlMiddleware
RequestConfigProvider proxy.RequestConfigProvider
}
Click to show internal directories.
Click to hide internal directories.