proxycodec

package
v0.0.0-...-015ad48 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "proxyCodec"

Variables

View Source
var File_model_proto protoreflect.FileDescriptor

Functions

func Codec

func Codec() encoding.Codec

返回了一个grpc.Codec类型的实例, 以protobuf原生codec为默认codec,实现了一个透明的Marshal和UnmarshMal

func CodecWithParent

func CodecWithParent(fallback encoding.Codec) encoding.Codec

一个协议无感知的codec实现,返回一个grpc.Codec类型的实例 该函数尝试将gRPC消息当作raw bytes来实现,当尝试失败后,会有fallback作为一个后退的codec

Types

type ProxyFrame

type ProxyFrame struct {
	ServiceName string `protobuf:"bytes,1,opt,name=serviceName,proto3" json:"serviceName,omitempty"`
	Model       string `protobuf:"bytes,2,opt,name=model,proto3" json:"model,omitempty"`
	Payload     []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

func (*ProxyFrame) Descriptor deprecated

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

Deprecated: Use ProxyFrame.ProtoReflect.Descriptor instead.

func (*ProxyFrame) GetModel

func (x *ProxyFrame) GetModel() string

func (*ProxyFrame) GetPayload

func (x *ProxyFrame) GetPayload() []byte

func (*ProxyFrame) GetServiceName

func (x *ProxyFrame) GetServiceName() string

func (*ProxyFrame) ProtoMessage

func (*ProxyFrame) ProtoMessage()

func (*ProxyFrame) ProtoReflect

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

func (*ProxyFrame) Reset

func (x *ProxyFrame) Reset()

func (*ProxyFrame) String

func (x *ProxyFrame) String() string

Jump to

Keyboard shortcuts

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