oohttp

package
v0.0.0-...-aaf6028 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Out-of-order HTTP!

Index

Constants

View Source
const ProtocolVersion byte = 1
View Source
const SniffHeader = "OOHttp"

Variables

This section is empty.

Functions

func InitServer

func InitServer(s *fastrpc.Server, hnd fasthttp.RequestHandler)

func NewFakeResponse

func NewFakeResponse() fastrpc.ResponseReader

func NewHandlerCtx

func NewHandlerCtx() fastrpc.HandlerCtx

Types

type Client

type Client struct {
	Inner fastrpc.Client
}

func (*Client) DoDeadline

func (c *Client) DoDeadline(req *fasthttp.Request, resp *fasthttp.Response, deadline time.Time) error

func (*Client) Init

func (c *Client) Init()

func (*Client) PendingRequests

func (c *Client) PendingRequests() int

type WrappedCtx

type WrappedCtx struct {
	Ctx fasthttp.RequestCtx
}

func (*WrappedCtx) ConcurrencyLimitError

func (w *WrappedCtx) ConcurrencyLimitError(concurrency int)

func (*WrappedCtx) Init

func (w *WrappedCtx) Init(conn net.Conn, logger fasthttp.Logger)

func (*WrappedCtx) ReadRequest

func (w *WrappedCtx) ReadRequest(br *bufio.Reader) error

func (*WrappedCtx) WriteResponse

func (w *WrappedCtx) WriteResponse(bw *bufio.Writer) error

type WrappedRequest

type WrappedRequest struct {
	Req *fasthttp.Request
}

func (*WrappedRequest) WriteRequest

func (w *WrappedRequest) WriteRequest(bw *bufio.Writer) error

type WrappedResponse

type WrappedResponse struct {
	Resp *fasthttp.Response
}

func (*WrappedResponse) ReadResponse

func (w *WrappedResponse) ReadResponse(br *bufio.Reader) error

Jump to

Keyboard shortcuts

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