Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterMRpcServiceServer(s grpc.ServiceRegistrar, srv MRpcServiceServer)
- type MRpcMessage
- func (*MRpcMessage) Descriptor() ([]byte, []int)deprecated
- func (x *MRpcMessage) GetData() []byte
- func (x *MRpcMessage) GetMsgId() int32
- func (x *MRpcMessage) GetSessionId() string
- func (*MRpcMessage) ProtoMessage()
- func (x *MRpcMessage) ProtoReflect() protoreflect.Message
- func (x *MRpcMessage) Reset()
- func (x *MRpcMessage) String() string
- type MRpcMessageAck
- func (*MRpcMessageAck) Descriptor() ([]byte, []int)deprecated
- func (x *MRpcMessageAck) GetAckData() []byte
- func (x *MRpcMessageAck) GetAckMsgId() int32
- func (x *MRpcMessageAck) GetSessionId() string
- func (*MRpcMessageAck) ProtoMessage()
- func (x *MRpcMessageAck) ProtoReflect() protoreflect.Message
- func (x *MRpcMessageAck) Reset()
- func (x *MRpcMessageAck) String() string
- type MRpcServiceClient
- type MRpcServiceServer
- type MRpcService_DuplexStreamClient
- type MRpcService_DuplexStreamServer
- type MRpcService_MultRequestClient
- type MRpcService_MultRequestServer
- type MRpcService_RequestMultRespClient
- type MRpcService_RequestMultRespServer
- type UnimplementedMRpcServiceServer
- func (UnimplementedMRpcServiceServer) DuplexStream(grpc.BidiStreamingServer[MRpcMessage, MRpcMessageAck]) error
- func (UnimplementedMRpcServiceServer) MultRequest(grpc.ClientStreamingServer[MRpcMessage, MRpcMessageAck]) error
- func (UnimplementedMRpcServiceServer) Request(context.Context, *MRpcMessage) (*MRpcMessageAck, error)
- func (UnimplementedMRpcServiceServer) RequestMultResp(*MRpcMessage, grpc.ServerStreamingServer[MRpcMessageAck]) error
- type UnsafeMRpcServiceServer
Constants ¶
const ( MRpcService_Request_FullMethodName = "/message.MRpcService/Request" MRpcService_RequestMultResp_FullMethodName = "/message.MRpcService/RequestMultResp" MRpcService_MultRequest_FullMethodName = "/message.MRpcService/MultRequest" MRpcService_DuplexStream_FullMethodName = "/message.MRpcService/DuplexStream" )
Variables ¶
var File_v1_message_proto protoreflect.FileDescriptor
var MRpcService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "message.MRpcService", HandlerType: (*MRpcServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Request", Handler: _MRpcService_Request_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "RequestMultResp", Handler: _MRpcService_RequestMultResp_Handler, ServerStreams: true, }, { StreamName: "MultRequest", Handler: _MRpcService_MultRequest_Handler, ClientStreams: true, }, { StreamName: "DuplexStream", Handler: _MRpcService_DuplexStream_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "v1/message.proto", }
MRpcService_ServiceDesc is the grpc.ServiceDesc for MRpcService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterMRpcServiceServer ¶
func RegisterMRpcServiceServer(s grpc.ServiceRegistrar, srv MRpcServiceServer)
Types ¶
type MRpcMessage ¶
type MRpcMessage struct {
SessionId string `protobuf:"bytes,1,opt,name=sessionId,proto3" json:"sessionId,omitempty"`
MsgId int32 `protobuf:"varint,2,opt,name=msgId,proto3" json:"msgId,omitempty"`
Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
// contains filtered or unexported fields
}
func (*MRpcMessage) Descriptor
deprecated
func (*MRpcMessage) Descriptor() ([]byte, []int)
Deprecated: Use MRpcMessage.ProtoReflect.Descriptor instead.
func (*MRpcMessage) GetData ¶
func (x *MRpcMessage) GetData() []byte
func (*MRpcMessage) GetMsgId ¶
func (x *MRpcMessage) GetMsgId() int32
func (*MRpcMessage) GetSessionId ¶
func (x *MRpcMessage) GetSessionId() string
func (*MRpcMessage) ProtoMessage ¶
func (*MRpcMessage) ProtoMessage()
func (*MRpcMessage) ProtoReflect ¶
func (x *MRpcMessage) ProtoReflect() protoreflect.Message
func (*MRpcMessage) Reset ¶
func (x *MRpcMessage) Reset()
func (*MRpcMessage) String ¶
func (x *MRpcMessage) String() string
type MRpcMessageAck ¶
type MRpcMessageAck struct {
SessionId string `protobuf:"bytes,1,opt,name=sessionId,proto3" json:"sessionId,omitempty"`
AckMsgId int32 `protobuf:"varint,2,opt,name=ackMsgId,proto3" json:"ackMsgId,omitempty"`
AckData []byte `protobuf:"bytes,3,opt,name=ackData,proto3" json:"ackData,omitempty"`
// contains filtered or unexported fields
}
func (*MRpcMessageAck) Descriptor
deprecated
func (*MRpcMessageAck) Descriptor() ([]byte, []int)
Deprecated: Use MRpcMessageAck.ProtoReflect.Descriptor instead.
func (*MRpcMessageAck) GetAckData ¶
func (x *MRpcMessageAck) GetAckData() []byte
func (*MRpcMessageAck) GetAckMsgId ¶
func (x *MRpcMessageAck) GetAckMsgId() int32
func (*MRpcMessageAck) GetSessionId ¶
func (x *MRpcMessageAck) GetSessionId() string
func (*MRpcMessageAck) ProtoMessage ¶
func (*MRpcMessageAck) ProtoMessage()
func (*MRpcMessageAck) ProtoReflect ¶
func (x *MRpcMessageAck) ProtoReflect() protoreflect.Message
func (*MRpcMessageAck) Reset ¶
func (x *MRpcMessageAck) Reset()
func (*MRpcMessageAck) String ¶
func (x *MRpcMessageAck) String() string
type MRpcServiceClient ¶
type MRpcServiceClient interface {
Request(ctx context.Context, in *MRpcMessage, opts ...grpc.CallOption) (*MRpcMessageAck, error)
RequestMultResp(ctx context.Context, in *MRpcMessage, opts ...grpc.CallOption) (grpc.ServerStreamingClient[MRpcMessageAck], error)
MultRequest(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[MRpcMessage, MRpcMessageAck], error)
DuplexStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[MRpcMessage, MRpcMessageAck], error)
}
MRpcServiceClient is the client API for MRpcService 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 NewMRpcServiceClient ¶
func NewMRpcServiceClient(cc grpc.ClientConnInterface) MRpcServiceClient
type MRpcServiceServer ¶
type MRpcServiceServer interface {
Request(context.Context, *MRpcMessage) (*MRpcMessageAck, error)
RequestMultResp(*MRpcMessage, grpc.ServerStreamingServer[MRpcMessageAck]) error
MultRequest(grpc.ClientStreamingServer[MRpcMessage, MRpcMessageAck]) error
DuplexStream(grpc.BidiStreamingServer[MRpcMessage, MRpcMessageAck]) error
// contains filtered or unexported methods
}
MRpcServiceServer is the server API for MRpcService service. All implementations must embed UnimplementedMRpcServiceServer for forward compatibility.
type MRpcService_DuplexStreamClient ¶
type MRpcService_DuplexStreamClient = grpc.BidiStreamingClient[MRpcMessage, MRpcMessageAck]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type MRpcService_DuplexStreamServer ¶
type MRpcService_DuplexStreamServer = grpc.BidiStreamingServer[MRpcMessage, MRpcMessageAck]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type MRpcService_MultRequestClient ¶
type MRpcService_MultRequestClient = grpc.ClientStreamingClient[MRpcMessage, MRpcMessageAck]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type MRpcService_MultRequestServer ¶
type MRpcService_MultRequestServer = grpc.ClientStreamingServer[MRpcMessage, MRpcMessageAck]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type MRpcService_RequestMultRespClient ¶
type MRpcService_RequestMultRespClient = grpc.ServerStreamingClient[MRpcMessageAck]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type MRpcService_RequestMultRespServer ¶
type MRpcService_RequestMultRespServer = grpc.ServerStreamingServer[MRpcMessageAck]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type UnimplementedMRpcServiceServer ¶
type UnimplementedMRpcServiceServer struct{}
UnimplementedMRpcServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedMRpcServiceServer) DuplexStream ¶
func (UnimplementedMRpcServiceServer) DuplexStream(grpc.BidiStreamingServer[MRpcMessage, MRpcMessageAck]) error
func (UnimplementedMRpcServiceServer) MultRequest ¶
func (UnimplementedMRpcServiceServer) MultRequest(grpc.ClientStreamingServer[MRpcMessage, MRpcMessageAck]) error
func (UnimplementedMRpcServiceServer) Request ¶
func (UnimplementedMRpcServiceServer) Request(context.Context, *MRpcMessage) (*MRpcMessageAck, error)
func (UnimplementedMRpcServiceServer) RequestMultResp ¶
func (UnimplementedMRpcServiceServer) RequestMultResp(*MRpcMessage, grpc.ServerStreamingServer[MRpcMessageAck]) error
type UnsafeMRpcServiceServer ¶
type UnsafeMRpcServiceServer interface {
// contains filtered or unexported methods
}
UnsafeMRpcServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MRpcServiceServer will result in compilation errors.