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 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) Descriptor ¶ added in v2.4.0
func (*Request) GetServiceMethod ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) XXX_DiscardUnknown ¶ added in v2.4.0
func (m *Request) XXX_DiscardUnknown()
func (*Request) XXX_Marshal ¶ added in v2.4.0
func (*Request) XXX_Unmarshal ¶ added in v2.4.0
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) Descriptor ¶ added in v2.4.0
func (*Response) GetServiceMethod ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) XXX_DiscardUnknown ¶ added in v2.4.0
func (m *Response) XXX_DiscardUnknown()
func (*Response) XXX_Marshal ¶ added in v2.4.0
func (*Response) XXX_Unmarshal ¶ added in v2.4.0
Click to show internal directories.
Click to hide internal directories.