go-micro: github.com/micro/go-micro/codec/protorpc Index | Files

package protorpc

import "github.com/micro/go-micro/codec/protorpc"

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

Index

Package Files

envelope.pb.go envelope.pb.micro.go netstring.go protorpc.go

func NewCodec Uses

func NewCodec(rwc io.ReadWriteCloser) codec.Codec

func ReadNetString Uses

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

ReadNetString reads data from a big-endian netstring.

func WriteNetString Uses

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.

type Request Uses

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 Uses

func (*Request) Descriptor() ([]byte, []int)

func (*Request) GetSeq Uses

func (m *Request) GetSeq() uint64

func (*Request) GetServiceMethod Uses

func (m *Request) GetServiceMethod() string

func (*Request) ProtoMessage Uses

func (*Request) ProtoMessage()

func (*Request) Reset Uses

func (m *Request) Reset()

func (*Request) String Uses

func (m *Request) String() string

func (*Request) XXX_DiscardUnknown Uses

func (m *Request) XXX_DiscardUnknown()

func (*Request) XXX_Marshal Uses

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

func (*Request) XXX_Merge Uses

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

func (*Request) XXX_Size Uses

func (m *Request) XXX_Size() int

func (*Request) XXX_Unmarshal Uses

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

type Response Uses

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 Uses

func (*Response) Descriptor() ([]byte, []int)

func (*Response) GetError Uses

func (m *Response) GetError() string

func (*Response) GetSeq Uses

func (m *Response) GetSeq() uint64

func (*Response) GetServiceMethod Uses

func (m *Response) GetServiceMethod() string

func (*Response) ProtoMessage Uses

func (*Response) ProtoMessage()

func (*Response) Reset Uses

func (m *Response) Reset()

func (*Response) String Uses

func (m *Response) String() string

func (*Response) XXX_DiscardUnknown Uses

func (m *Response) XXX_DiscardUnknown()

func (*Response) XXX_Marshal Uses

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

func (*Response) XXX_Merge Uses

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

func (*Response) XXX_Size Uses

func (m *Response) XXX_Size() int

func (*Response) XXX_Unmarshal Uses

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

Package protorpc imports 9 packages (graph) and is imported by 89 packages. Updated 2020-03-31. Refresh now. Tools for package owners.