Documentation ¶
Index ¶
- Variables
- func RegisterEncoderServiceServer(s grpc.ServiceRegistrar, srv EncoderServiceServer)
- type DecodeRequest
- func (*DecodeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DecodeRequest) GetData() []byte
- func (x *DecodeRequest) GetVersion() int32
- func (*DecodeRequest) ProtoMessage()
- func (x *DecodeRequest) ProtoReflect() protoreflect.Message
- func (x *DecodeRequest) Reset()
- func (x *DecodeRequest) String() string
- type EncodeRequest
- func (*EncodeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EncodeRequest) GetData() *anypb.Any
- func (x *EncodeRequest) GetVersion() int32
- func (*EncodeRequest) ProtoMessage()
- func (x *EncodeRequest) ProtoReflect() protoreflect.Message
- func (x *EncodeRequest) Reset()
- func (x *EncodeRequest) String() string
- type EncoderServiceClient
- type EncoderServiceServer
- type UnimplementedEncoderServiceServer
- func (UnimplementedEncoderServiceServer) Decode(context.Context, *DecodeRequest) (*anypb.Any, error)
- func (UnimplementedEncoderServiceServer) Encode(context.Context, *EncodeRequest) (*wrapperspb.BytesValue, error)
- func (UnimplementedEncoderServiceServer) NewPacket(context.Context, *anypb.Any) (*v1.Packet, error)
- func (UnimplementedEncoderServiceServer) NewPacketBytes(context.Context, *anypb.Any) (*wrapperspb.BytesValue, error)
- func (UnimplementedEncoderServiceServer) PacketDecode(context.Context, *wrapperspb.BytesValue) (*v1.Packet, error)
- func (UnimplementedEncoderServiceServer) PacketEncode(context.Context, *v1.Packet) (*wrapperspb.BytesValue, error)
- func (UnimplementedEncoderServiceServer) UnpackPacket(context.Context, *v1.Packet) (*anypb.Any, error)
- type UnsafeEncoderServiceServer
Constants ¶
This section is empty.
Variables ¶
var EncoderService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "ras.encoder.EncoderService", HandlerType: (*EncoderServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Encode", Handler: _EncoderService_Encode_Handler, }, { MethodName: "Decode", Handler: _EncoderService_Decode_Handler, }, { MethodName: "PacketEncode", Handler: _EncoderService_PacketEncode_Handler, }, { MethodName: "PacketDecode", Handler: _EncoderService_PacketDecode_Handler, }, { MethodName: "NewPacket", Handler: _EncoderService_NewPacket_Handler, }, { MethodName: "NewPacketBytes", Handler: _EncoderService_NewPacketBytes_Handler, }, { MethodName: "UnpackPacket", Handler: _EncoderService_UnpackPacket_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "ras/encoder/encoder_service.proto", }
EncoderService_ServiceDesc is the grpc.ServiceDesc for EncoderService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_ras_encoder_encoder_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEncoderServiceServer ¶
func RegisterEncoderServiceServer(s grpc.ServiceRegistrar, srv EncoderServiceServer)
Types ¶
type DecodeRequest ¶
type DecodeRequest struct { Version int32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*DecodeRequest) Descriptor
deprecated
func (*DecodeRequest) Descriptor() ([]byte, []int)
Deprecated: Use DecodeRequest.ProtoReflect.Descriptor instead.
func (*DecodeRequest) GetData ¶
func (x *DecodeRequest) GetData() []byte
func (*DecodeRequest) GetVersion ¶
func (x *DecodeRequest) GetVersion() int32
func (*DecodeRequest) ProtoMessage ¶
func (*DecodeRequest) ProtoMessage()
func (*DecodeRequest) ProtoReflect ¶
func (x *DecodeRequest) ProtoReflect() protoreflect.Message
func (*DecodeRequest) Reset ¶
func (x *DecodeRequest) Reset()
func (*DecodeRequest) String ¶
func (x *DecodeRequest) String() string
type EncodeRequest ¶
type EncodeRequest struct { Version int32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` Data *anypb.Any `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*EncodeRequest) Descriptor
deprecated
func (*EncodeRequest) Descriptor() ([]byte, []int)
Deprecated: Use EncodeRequest.ProtoReflect.Descriptor instead.
func (*EncodeRequest) GetData ¶
func (x *EncodeRequest) GetData() *anypb.Any
func (*EncodeRequest) GetVersion ¶
func (x *EncodeRequest) GetVersion() int32
func (*EncodeRequest) ProtoMessage ¶
func (*EncodeRequest) ProtoMessage()
func (*EncodeRequest) ProtoReflect ¶
func (x *EncodeRequest) ProtoReflect() protoreflect.Message
func (*EncodeRequest) Reset ¶
func (x *EncodeRequest) Reset()
func (*EncodeRequest) String ¶
func (x *EncodeRequest) String() string
type EncoderServiceClient ¶
type EncoderServiceClient interface { //codec debug func Encode(ctx context.Context, in *EncodeRequest, opts ...grpc.CallOption) (*wrapperspb.BytesValue, error) Decode(ctx context.Context, in *DecodeRequest, opts ...grpc.CallOption) (*anypb.Any, error) //packet debug func PacketEncode(ctx context.Context, in *v1.Packet, opts ...grpc.CallOption) (*wrapperspb.BytesValue, error) PacketDecode(ctx context.Context, in *wrapperspb.BytesValue, opts ...grpc.CallOption) (*v1.Packet, error) // Конвертирует любой сообщение в пакет // Сообщение должно реализовавать интерфейс пакета // * PacketType() // * Format() NewPacket(ctx context.Context, in *anypb.Any, opts ...grpc.CallOption) (*v1.Packet, error) // Аналог NewPacket только еще сразу кодирует пакет в байты NewPacketBytes(ctx context.Context, in *anypb.Any, opts ...grpc.CallOption) (*wrapperspb.BytesValue, error) // Выполняет распаковку пакета в полученное сообщение // Распаковывает 1 уровень данных // Возможные значения // * ras.protocol.v1.ConnectMessageAck // * ras.protocol.v1.EndpointFailureAck // * ras.protocol.v1.EndpointOpenAck // * ras.protocol.v1.EndpointMessage UnpackPacket(ctx context.Context, in *v1.Packet, opts ...grpc.CallOption) (*anypb.Any, error) }
EncoderServiceClient is the client API for EncoderService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewEncoderServiceClient ¶
func NewEncoderServiceClient(cc grpc.ClientConnInterface) EncoderServiceClient
type EncoderServiceServer ¶
type EncoderServiceServer interface { //codec debug func Encode(context.Context, *EncodeRequest) (*wrapperspb.BytesValue, error) Decode(context.Context, *DecodeRequest) (*anypb.Any, error) //packet debug func PacketEncode(context.Context, *v1.Packet) (*wrapperspb.BytesValue, error) PacketDecode(context.Context, *wrapperspb.BytesValue) (*v1.Packet, error) // Конвертирует любой сообщение в пакет // Сообщение должно реализовавать интерфейс пакета // * PacketType() // * Format() NewPacket(context.Context, *anypb.Any) (*v1.Packet, error) // Аналог NewPacket только еще сразу кодирует пакет в байты NewPacketBytes(context.Context, *anypb.Any) (*wrapperspb.BytesValue, error) // Выполняет распаковку пакета в полученное сообщение // Распаковывает 1 уровень данных // Возможные значения // * ras.protocol.v1.ConnectMessageAck // * ras.protocol.v1.EndpointFailureAck // * ras.protocol.v1.EndpointOpenAck // * ras.protocol.v1.EndpointMessage UnpackPacket(context.Context, *v1.Packet) (*anypb.Any, error) }
EncoderServiceServer is the server API for EncoderService service. All implementations should embed UnimplementedEncoderServiceServer for forward compatibility
type UnimplementedEncoderServiceServer ¶
type UnimplementedEncoderServiceServer struct { }
UnimplementedEncoderServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedEncoderServiceServer) Decode ¶
func (UnimplementedEncoderServiceServer) Decode(context.Context, *DecodeRequest) (*anypb.Any, error)
func (UnimplementedEncoderServiceServer) Encode ¶
func (UnimplementedEncoderServiceServer) Encode(context.Context, *EncodeRequest) (*wrapperspb.BytesValue, error)
func (UnimplementedEncoderServiceServer) NewPacketBytes ¶
func (UnimplementedEncoderServiceServer) NewPacketBytes(context.Context, *anypb.Any) (*wrapperspb.BytesValue, error)
func (UnimplementedEncoderServiceServer) PacketDecode ¶
func (UnimplementedEncoderServiceServer) PacketDecode(context.Context, *wrapperspb.BytesValue) (*v1.Packet, error)
func (UnimplementedEncoderServiceServer) PacketEncode ¶
func (UnimplementedEncoderServiceServer) PacketEncode(context.Context, *v1.Packet) (*wrapperspb.BytesValue, error)
func (UnimplementedEncoderServiceServer) UnpackPacket ¶
type UnsafeEncoderServiceServer ¶
type UnsafeEncoderServiceServer interface {
// contains filtered or unexported methods
}
UnsafeEncoderServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EncoderServiceServer will result in compilation errors.