Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AsyncClient ¶ added in v0.5.0
type AsyncClient interface {
Do(req *http.Request, fn ResponseFn)
}
AsyncClient asynchronous client interface
func NewAsyncClient ¶ added in v0.5.0
func NewAsyncClient(client *http.Client, conf *AsyncClientConf) AsyncClient
NewAsyncClient create an AsyncClient instance
type AsyncClientConf ¶ added in v0.5.0
type AsyncClientConf struct { MinWorker int MaxRequestBuf int MaxRequestTempBuf int MaxTickCount int TickWaitTime time.Duration }
AsyncClientConf client configure used to create an AsynClient instance
type ConnectMux ¶
type ConnectMux struct {
// contains filtered or unexported fields
}
ConnectMux mux used for Connect
func NewConnectMux ¶
func NewConnectMux(pathPrefix ...string) *ConnectMux
NewConnectMux allocates and returns a new ConnectMux.
func (*ConnectMux) Handle ¶
func (mux *ConnectMux) Handle(path string, handler http.Handler)
Handle registers the handler for the given path. If a handler already exists for path, Handle panics.
func (*ConnectMux) ServeHTTP ¶
func (mux *ConnectMux) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP dispatches the request to the handler whose pattern most closely matches the request URL.
type ResponseFn ¶ added in v0.5.0
ResponseFn a function used handle the response of http.Client.Do
Click to show internal directories.
Click to hide internal directories.