protorpc

package
v2.9.1 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: Apache-2.0 Imports: 9 Imported by: 19

Documentation

Overview

Protorpc provides a net/rpc proto-rpc codec. See envelope.proto for the format.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCodec

func NewCodec(rwc io.ReadWriteCloser) codec.Codec

func ReadNetString

func ReadNetString(r io.Reader) (data []byte, err error)

ReadNetString reads data from a big-endian netstring.

func WriteNetString

func WriteNetString(w io.Writer, data []byte) (written int, err error)

WriteNetString writes data to a big-endian netstring on a Writer. Size is always a 32-bit unsigned int.

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) Descriptor() ([]byte, []int)

func (*Request) GetSeq

func (m *Request) GetSeq() uint64

func (*Request) GetServiceMethod

func (m *Request) GetServiceMethod() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) String

func (m *Request) String() string

func (*Request) XXX_DiscardUnknown added in v2.4.0

func (m *Request) XXX_DiscardUnknown()

func (*Request) XXX_Marshal added in v2.4.0

func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Request) XXX_Merge added in v2.4.0

func (m *Request) XXX_Merge(src proto.Message)

func (*Request) XXX_Size added in v2.4.0

func (m *Request) XXX_Size() int

func (*Request) XXX_Unmarshal added in v2.4.0

func (m *Request) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*Response) GetError

func (m *Response) GetError() string

func (*Response) GetSeq

func (m *Response) GetSeq() uint64

func (*Response) GetServiceMethod

func (m *Response) GetServiceMethod() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) String

func (m *Response) String() string

func (*Response) XXX_DiscardUnknown added in v2.4.0

func (m *Response) XXX_DiscardUnknown()

func (*Response) XXX_Marshal added in v2.4.0

func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Response) XXX_Merge added in v2.4.0

func (m *Response) XXX_Merge(src proto.Message)

func (*Response) XXX_Size added in v2.4.0

func (m *Response) XXX_Size() int

func (*Response) XXX_Unmarshal added in v2.4.0

func (m *Response) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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