bsonrpc

package
v0.0.0-...-2166858 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 28, 2016 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultBufferSize = 4096

Variables

This section is empty.

Functions

func DialAuthHTTP

func DialAuthHTTP(network, address, user, password string, connectTimeout time.Duration, config *tls.Config) (*rpc.Client, error)

func DialHTTP

func DialHTTP(network, address string, connectTimeout time.Duration, config *tls.Config) (*rpc.Client, error)

func NewClientCodec

func NewClientCodec(conn io.ReadWriteCloser) rpc.ClientCodec

func NewServerCodec

func NewServerCodec(conn io.ReadWriteCloser) rpc.ServerCodec

func ServeAuthRPC

func ServeAuthRPC()

func ServeCustomRPC

func ServeCustomRPC(handler *http.ServeMux, server *rpc.Server, useAuth bool)

func ServeRPC

func ServeRPC()

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

type RequestBson struct {
	*rpc.Request
}

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

type ResponseBson struct {
	*rpc.Response
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL