proto

package
v0.0.0-...-c18a219 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PkgName               = "auxo.net.rpc.codec.proto"
	DefaultMaxMessageSize = 2 << 20
)

Variables

Functions

This section is empty.

Types

type Builder

type Builder struct {
}

func (Builder) NewClient

func (b Builder) NewClient(s rpc.Stream, opts data.Map) rpc.ClientCodec

func (Builder) NewServer

func (b Builder) NewServer(s rpc.Stream, opts data.Map) rpc.ServerCodec

type ClientCodec

type ClientCodec struct {
	rpc.Stream
	// contains filtered or unexported fields
}

func (*ClientCodec) DecodeHead

func (c *ClientCodec) DecodeHead(head *rpc.ResponseHead) error

func (*ClientCodec) DecodeResult

func (c *ClientCodec) DecodeResult(result *rpc.Result) (err error)

func (*ClientCodec) DiscardResult

func (*ClientCodec) DiscardResult() error

func (*ClientCodec) Encode

func (c *ClientCodec) Encode(req *rpc.Request) (err error)

type Error

type Error struct {
	Code    *int32  `protobuf:"varint,1,opt,name=Code,proto3,oneof" json:"Code,omitempty"`
	Message *string `protobuf:"bytes,2,opt,name=Message,proto3,oneof" json:"Message,omitempty"`
	Detail  *string `protobuf:"bytes,3,opt,name=Detail,proto3,oneof" json:"Detail,omitempty"`
	// contains filtered or unexported fields
}

func (*Error) Descriptor deprecated

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

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetCode

func (x *Error) GetCode() int32

func (*Error) GetDetail

func (x *Error) GetDetail() string

func (*Error) GetMessage

func (x *Error) GetMessage() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

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

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

type Label

type Label struct {
	Name  string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=Value,proto3" json:"Value,omitempty"`
	// contains filtered or unexported fields
}

func (*Label) Descriptor deprecated

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

Deprecated: Use Label.ProtoReflect.Descriptor instead.

func (*Label) GetName

func (x *Label) GetName() string

func (*Label) GetValue

func (x *Label) GetValue() string

func (*Label) ProtoMessage

func (*Label) ProtoMessage()

func (*Label) ProtoReflect

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

func (*Label) Reset

func (x *Label) Reset()

func (*Label) String

func (x *Label) String() string

type Request

type Request struct {
	ID      *uint64  `protobuf:"varint,1,opt,name=ID,proto3,oneof" json:"ID,omitempty"`
	Service *string  `protobuf:"bytes,2,opt,name=Service,proto3,oneof" json:"Service,omitempty"`
	Method  *string  `protobuf:"bytes,3,opt,name=Method,proto3,oneof" json:"Method,omitempty"`
	Labels  []*Label `protobuf:"bytes,4,rep,name=Labels,proto3" json:"Labels,omitempty"`
	Args    [][]byte `protobuf:"bytes,5,rep,name=Args,proto3" json:"Args,omitempty"`
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetArgs

func (x *Request) GetArgs() [][]byte

func (*Request) GetID

func (x *Request) GetID() uint64

func (*Request) GetLabels

func (x *Request) GetLabels() []*Label

func (*Request) GetMethod

func (x *Request) GetMethod() string

func (*Request) GetService

func (x *Request) GetService() 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 {
	ID     *uint64 `protobuf:"varint,1,opt,name=ID,proto3,oneof" json:"ID,omitempty"`
	Result []byte  `protobuf:"bytes,2,opt,name=Result,proto3,oneof" json:"Result,omitempty"`
	Error  *Error  `protobuf:"bytes,3,opt,name=Error,proto3,oneof" 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() *Error

func (*Response) GetID

func (x *Response) GetID() uint64

func (*Response) GetResult

func (x *Response) GetResult() []byte

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

type ServerCodec

type ServerCodec struct {
	rpc.Stream
	// contains filtered or unexported fields
}

func (*ServerCodec) DecodeArgs

func (c *ServerCodec) DecodeArgs(args []interface{}) error

func (*ServerCodec) DecodeHead

func (c *ServerCodec) DecodeHead(head *rpc.RequestHead) error

func (*ServerCodec) DiscardArgs

func (*ServerCodec) DiscardArgs() error

func (*ServerCodec) Encode

func (c *ServerCodec) Encode(resp *rpc.Response) (err error)

Jump to

Keyboard shortcuts

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