Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithClient ¶ added in v1.9.2
func GetShortConnClient ¶
func GetShortConnClient(timeout time.Duration, httpTransports ...HttpTransport) *http.Client
Types ¶
type Client ¶
type Client struct { Protocol string Host string Port int16 Timeout time.Duration RequestTransformerMgr *httptransport.RequestTransformerMgr HttpTransports []HttpTransport NewError func(resp *http.Response) error }
func (*Client) SetDefaults ¶
func (c *Client) SetDefaults()
type HttpTransport ¶
type HttpTransport func(rt http.RoundTripper) http.RoundTripper
type Result ¶
type Result struct { TransformerMgr transformers.TransformerMgr Response *http.Response NewError func(resp *http.Response) error Err error }
type StatusError ¶
type StatusError int
const ( // request failed RequestFailed StatusError = http.StatusInternalServerError*1e6 + iota + 1 // read failed ReadFailed )
const ( // transform request failed RequestTransformFailed StatusError = http.StatusBadRequest*1e6 + iota + 1 )
func (StatusError) CanBeTalkError ¶
func (v StatusError) CanBeTalkError() bool
func (StatusError) Code ¶
func (v StatusError) Code() int
func (StatusError) Error ¶
func (v StatusError) Error() string
func (StatusError) Key ¶
func (v StatusError) Key() string
func (StatusError) Msg ¶
func (v StatusError) Msg() string
func (StatusError) StatusCode ¶
func (v StatusError) StatusCode() int
func (StatusError) StatusErr ¶
func (v StatusError) StatusErr() *github_com_go_courier_statuserror.StatusErr
Click to show internal directories.
Click to hide internal directories.