Documentation ¶
Overview ¶
Package pbrpc implements a ClientCodec and ServerCodec for the rpcplus package using Protocol Buffers.
Package pbrpc is a generated protocol buffer package.
It is generated from these files:
envelope.proto
It has these top-level messages:
Request Response
Index ¶
- func Dial(network, address string) (*rpc.Client, error)
- func DialHTTP(network, address string, connectTimeout time.Duration) (*rpc.Client, error)
- func NewClient(conn io.ReadWriteCloser) *rpc.Client
- func NewClientCodec(conn io.ReadWriteCloser) rpc.ClientCodec
- func NewServerCodec(rwc io.ReadWriteCloser) rpc.ServerCodec
- func ReadNetString(r io.Reader) (data []byte, err error)
- func ServeRPC()
- func WriteNetString(w io.Writer, data []byte) (written int, err error)
- type Request
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶
func NewClient(conn io.ReadWriteCloser) *rpc.Client
NewClient returns a new rpc.Client to handle requests to the set of services at the other end of the connection.
func NewClientCodec ¶
func NewClientCodec(conn io.ReadWriteCloser) rpc.ClientCodec
NewClientCodec returns a new rpc.ClientCodec using Protobuf on conn.
func NewServerCodec ¶
func NewServerCodec(rwc io.ReadWriteCloser) rpc.ServerCodec
NewServerCodec returns a new ServerCodec.
func ReadNetString ¶
ReadNetString reads data from a big-endian netstring.
Types ¶
type Request ¶
type Request struct { ServiceMethod *string `protobuf:"bytes,1,opt,name=service_method" json:"service_method,omitempty"` Seq *uint64 `protobuf:"fixed64,2,opt,name=seq" json:"seq,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*Request) GetServiceMethod ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
type Response ¶
type Response struct { ServiceMethod *string `protobuf:"bytes,1,opt,name=service_method" json:"service_method,omitempty"` Seq *uint64 `protobuf:"fixed64,2,opt,name=seq" json:"seq,omitempty"` Error *string `protobuf:"bytes,3,opt,name=error" json:"error,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*Response) GetServiceMethod ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.