Documentation ¶
Overview ¶
Protorpc provides a net/rpc proto-rpc codec. See envelope.proto for the format.
Index ¶
- 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
- func (*Request) Descriptor() ([]byte, []int)
- func (m *Request) GetSeq() uint64
- func (m *Request) GetServiceMethod() string
- func (*Request) ProtoMessage()
- func (m *Request) Reset()
- func (m *Request) String() string
- func (m *Request) XXX_DiscardUnknown()
- func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Request) XXX_Merge(src proto.Message)
- func (m *Request) XXX_Size() int
- func (m *Request) XXX_Unmarshal(b []byte) error
- type Response
- func (*Response) Descriptor() ([]byte, []int)
- func (m *Response) GetError() string
- func (m *Response) GetSeq() uint64
- func (m *Response) GetServiceMethod() string
- func (*Response) ProtoMessage()
- func (m *Response) Reset()
- func (m *Response) String() string
- func (m *Response) XXX_DiscardUnknown()
- func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Response) XXX_Merge(src proto.Message)
- func (m *Response) XXX_Size() int
- func (m *Response) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCodec ¶
func NewCodec(rwc io.ReadWriteCloser) codec.Codec
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Request) XXX_Marshal ¶
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Response) XXX_Marshal ¶
Click to show internal directories.
Click to hide internal directories.