protorpc

package
v3.10.7 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

View Source
var File_envelope_proto protoreflect.FileDescriptor

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"`
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetSeq

func (x *Request) GetSeq() uint64

func (*Request) GetServiceMethod

func (x *Request) GetServiceMethod() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

func (x *Request) ProtoReflect() protoreflect.Message

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetError

func (x *Response) GetError() string

func (*Response) GetSeq

func (x *Response) GetSeq() uint64

func (*Response) GetServiceMethod

func (x *Response) GetServiceMethod() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

func (x *Response) ProtoReflect() protoreflect.Message

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

Jump to

Keyboard shortcuts

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