Documentation ¶
Index ¶
- Variables
- type AcceptStreamHandlerFunc
- type Client
- func (cli *Client) Call(req *http.Request, timeout time.Duration) (*http.Response, error)
- func (cli *Client) Close() error
- func (cli *Client) OpenStream(timeout time.Duration) (*Stream, error)
- func (cli *Client) SetCompresser(compresser encoding.Compresser)
- func (cli *Client) SetEncrypter(encrypter encoding.Encrypter)
- type RequestHandlerFunc
- type Server
- type ServerConfig
- type Stream
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrClosed = errors.New("closed")
ErrClosed closed error
View Source
var ErrReconnecting = errors.New("reconnecting")
ErrReconnecting reconnecting error
View Source
var ErrTimeout = errors.New("transport: timeout")
ErrTimeout timeout error
Functions ¶
This section is empty.
Types ¶
type AcceptStreamHandlerFunc ¶
type AcceptStreamHandlerFunc func(*Stream)
AcceptStreamHandlerFunc handler func after accept
type Client ¶
Client rpc client
func (*Client) OpenStream ¶
OpenStream open stream
func (*Client) SetCompresser ¶ added in v1.0.4
func (cli *Client) SetCompresser(compresser encoding.Compresser)
SetCompresser set compresser
func (*Client) SetEncrypter ¶ added in v1.0.4
SetEncrypter set encrypter
type RequestHandlerFunc ¶
RequestHandlerFunc request handler
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server rpc server
func (*Server) ListenAndServe ¶
ListenAndServe listen and serve
type ServerConfig ¶ added in v1.0.4
type ServerConfig struct { Encrypter encoding.Encrypter Compresser encoding.Compresser OnRequest RequestHandlerFunc OnAccept AcceptStreamHandlerFunc }
ServerConfig server config
Click to show internal directories.
Click to hide internal directories.