Documentation ¶
Index ¶
- Constants
- func DialAuthHTTP(network, address, user, password string, connectTimeout time.Duration, ...) (*rpc.Client, error)
- func DialHTTP(network, address string, connectTimeout time.Duration, config *tls.Config) (*rpc.Client, error)
- func NewClientCodec(conn io.ReadWriteCloser) rpc.ClientCodec
- func NewServerCodec(conn io.ReadWriteCloser) rpc.ServerCodec
- func ServeAuthRPC()
- func ServeRPC()
- type ClientCodec
- type RequestBson
- type ResponseBson
- type ServerCodec
Constants ¶
View Source
const DefaultBufferSize = 4096
Variables ¶
This section is empty.
Functions ¶
func DialAuthHTTP ¶
func NewClientCodec ¶
func NewClientCodec(conn io.ReadWriteCloser) rpc.ClientCodec
func NewServerCodec ¶
func NewServerCodec(conn io.ReadWriteCloser) rpc.ServerCodec
func ServeAuthRPC ¶
func ServeAuthRPC()
Types ¶
type ClientCodec ¶
type ClientCodec struct {
// contains filtered or unexported fields
}
func (*ClientCodec) Close ¶
func (cc *ClientCodec) Close() error
func (*ClientCodec) ReadResponseBody ¶
func (cc *ClientCodec) ReadResponseBody(body interface{}) error
func (*ClientCodec) ReadResponseHeader ¶
func (cc *ClientCodec) ReadResponseHeader(r *rpc.Response) error
func (*ClientCodec) WriteRequest ¶
func (cc *ClientCodec) WriteRequest(r *rpc.Request, body interface{}) error
type RequestBson ¶
func (*RequestBson) MarshalBson ¶
func (req *RequestBson) MarshalBson(buf *bytes2.ChunkedWriter, key string)
func (*RequestBson) UnmarshalBson ¶
func (req *RequestBson) UnmarshalBson(buf *bytes.Buffer, kind byte)
type ResponseBson ¶
func (*ResponseBson) MarshalBson ¶
func (resp *ResponseBson) MarshalBson(buf *bytes2.ChunkedWriter, key string)
func (*ResponseBson) UnmarshalBson ¶
func (resp *ResponseBson) UnmarshalBson(buf *bytes.Buffer, kind byte)
type ServerCodec ¶
type ServerCodec struct {
// contains filtered or unexported fields
}
func (*ServerCodec) Close ¶
func (sc *ServerCodec) Close() error
func (*ServerCodec) ReadRequestBody ¶
func (sc *ServerCodec) ReadRequestBody(body interface{}) error
func (*ServerCodec) ReadRequestHeader ¶
func (sc *ServerCodec) ReadRequestHeader(r *rpc.Request) error
func (*ServerCodec) WriteResponse ¶
func (sc *ServerCodec) WriteResponse(r *rpc.Response, body interface{}, last bool) error
Click to show internal directories.
Click to hide internal directories.