proto

package
v0.0.0-...-e5a7b82 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpRequestOut

func DumpRequestOut(req *http.Request, body bool) ([]byte, error)

DumpRequestOut is like DumpRequest but includes headers that the standard http.Transport adds, such as User-Agent.

Types

type Http

type Http struct {
	Txns *util.Broadcast
	// contains filtered or unexported fields
}

func NewHttp

func NewHttp() *Http

func (*Http) GetName

func (h *Http) GetName() string

func (*Http) WrapConn

func (h *Http) WrapConn(c conn.Conn, ctx interface{}) conn.Conn

type HttpRequest

type HttpRequest struct {
	*http.Request
	BodyBytes []byte
}

type HttpResponse

type HttpResponse struct {
	*http.Response
	BodyBytes []byte
}

type HttpTxn

type HttpTxn struct {
	Req         *HttpRequest
	Resp        *HttpResponse
	Start       time.Time
	Duration    time.Duration
	UserCtx     interface{}
	ConnUserCtx interface{}
}

type Protocol

type Protocol interface {
	GetName() string
	WrapConn(conn.Conn, interface{}) conn.Conn
}

type Tcp

type Tcp struct{}

func NewTcp

func NewTcp() *Tcp

func (*Tcp) GetName

func (h *Tcp) GetName() string

func (*Tcp) WrapConn

func (h *Tcp) WrapConn(c conn.Conn, ctx interface{}) conn.Conn

Jump to

Keyboard shortcuts

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