v1

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
var File_v1_message_proto protoreflect.FileDescriptor
View Source
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.

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) MultRequest

func (UnimplementedMRpcServiceServer) Request

func (UnimplementedMRpcServiceServer) RequestMultResp

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.

Jump to

Keyboard shortcuts

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