Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultHash ¶
Types ¶
type Middleware ¶
type Middleware func(RoundTripperFunc) RoundTripperFunc
Middleware defines the RoundTripperFunc Middleware.
type MiddlewareChain ¶
type MiddlewareChain []Middleware
MiddlewareChain defines a Middleware array.
func (MiddlewareChain) Len ¶
func (c MiddlewareChain) Len() int
Len returns the number of middlewares in the chain.
type RequestHash ¶
RequestHash hashes the request for identifying a unique request.
type RoundTripperFunc ¶
RoundTripperFunc defines the RoundTrip func used by http.RoundTripper.
type Transport ¶
type Transport struct { http.RoundTripper // contains filtered or unexported fields }
Transport implements the http.RoundTripper interface. The same as http.Transport,if is nil,will use http.DefaultTransport.
func (*Transport) Use ¶
func (t *Transport) Use(wares ...Middleware)
Use adds middleware to the t.middlewares,and wraps t.RoundTripper.
Click to show internal directories.
Click to hide internal directories.