Documentation ¶
Overview ¶
Protorpc provides a net/rpc proto-rpc codec. See envelope.proto for the format.
Index ¶
- Variables
- func NewCodec(rwc io.ReadWriteCloser) codec.Codec
- func ReadNetString(r io.Reader) (data []byte, err error)
- func WriteNetString(w io.Writer, data []byte) (written int, err error)
- type Request
- type Response
- func (*Response) Descriptor() ([]byte, []int)deprecated
- func (x *Response) GetError() string
- func (x *Response) GetSeq() uint64
- func (x *Response) GetServiceMethod() string
- func (*Response) ProtoMessage()
- func (x *Response) ProtoReflect() protoreflect.Message
- func (x *Response) Reset()
- func (x *Response) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_envelope_proto protoreflect.FileDescriptor
Functions ¶
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=serviceMethod,proto3" json:"service_method,omitempty"` Seq uint64 `protobuf:"fixed64,2,opt,name=seq,proto3" json:"seq,omitempty"` // contains filtered or unexported fields }
func (*Request) Descriptor
deprecated
func (*Request) GetServiceMethod ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type Response ¶
type Response struct { ServiceMethod string `protobuf:"bytes,1,opt,name=service_method,json=serviceMethod,proto3" json:"service_method,omitempty"` Seq uint64 `protobuf:"fixed64,2,opt,name=seq,proto3" json:"seq,omitempty"` Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
func (*Response) Descriptor
deprecated
func (*Response) GetServiceMethod ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.