1 Star 0 Fork 0

xlizy/rpc-interface

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
XMQService_grpc.pb.go 6.29 KB
一键复制 编辑 原始数据 按行查看 历史
xlizy 提交于 2024-10-21 16:27 . fix
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc v4.25.3
// source: XMQService.proto
package rpcApi
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
const (
XMQService_SendXMQ_FullMethodName = "/XMQService/SendXMQ"
XMQService_BatchLose_FullMethodName = "/XMQService/BatchLose"
XMQService_BatchResend_FullMethodName = "/XMQService/BatchResend"
)
// XMQServiceClient is the client API for XMQService 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 XMQServiceClient interface {
SendXMQ(ctx context.Context, in *SendXMQReq, opts ...grpc.CallOption) (*SendXMQRsp, error)
BatchLose(ctx context.Context, in *ResendXMQReq, opts ...grpc.CallOption) (*Result, error)
BatchResend(ctx context.Context, in *ResendXMQReq, opts ...grpc.CallOption) (*Result, error)
}
type xMQServiceClient struct {
cc grpc.ClientConnInterface
}
func NewXMQServiceClient(cc grpc.ClientConnInterface) XMQServiceClient {
return &xMQServiceClient{cc}
}
func (c *xMQServiceClient) SendXMQ(ctx context.Context, in *SendXMQReq, opts ...grpc.CallOption) (*SendXMQRsp, error) {
out := new(SendXMQRsp)
err := c.cc.Invoke(ctx, XMQService_SendXMQ_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *xMQServiceClient) BatchLose(ctx context.Context, in *ResendXMQReq, opts ...grpc.CallOption) (*Result, error) {
out := new(Result)
err := c.cc.Invoke(ctx, XMQService_BatchLose_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *xMQServiceClient) BatchResend(ctx context.Context, in *ResendXMQReq, opts ...grpc.CallOption) (*Result, error) {
out := new(Result)
err := c.cc.Invoke(ctx, XMQService_BatchResend_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// XMQServiceServer is the server API for XMQService service.
// All implementations must embed UnimplementedXMQServiceServer
// for forward compatibility
type XMQServiceServer interface {
SendXMQ(context.Context, *SendXMQReq) (*SendXMQRsp, error)
BatchLose(context.Context, *ResendXMQReq) (*Result, error)
BatchResend(context.Context, *ResendXMQReq) (*Result, error)
mustEmbedUnimplementedXMQServiceServer()
}
// UnimplementedXMQServiceServer must be embedded to have forward compatible implementations.
type UnimplementedXMQServiceServer struct {
}
func (UnimplementedXMQServiceServer) SendXMQ(context.Context, *SendXMQReq) (*SendXMQRsp, error) {
return nil, status.Errorf(codes.Unimplemented, "method SendXMQ not implemented")
}
func (UnimplementedXMQServiceServer) BatchLose(context.Context, *ResendXMQReq) (*Result, error) {
return nil, status.Errorf(codes.Unimplemented, "method BatchLose not implemented")
}
func (UnimplementedXMQServiceServer) BatchResend(context.Context, *ResendXMQReq) (*Result, error) {
return nil, status.Errorf(codes.Unimplemented, "method BatchResend not implemented")
}
func (UnimplementedXMQServiceServer) mustEmbedUnimplementedXMQServiceServer() {}
// UnsafeXMQServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to XMQServiceServer will
// result in compilation errors.
type UnsafeXMQServiceServer interface {
mustEmbedUnimplementedXMQServiceServer()
}
func RegisterXMQServiceServer(s grpc.ServiceRegistrar, srv XMQServiceServer) {
s.RegisterService(&XMQService_ServiceDesc, srv)
}
func _XMQService_SendXMQ_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SendXMQReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(XMQServiceServer).SendXMQ(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: XMQService_SendXMQ_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(XMQServiceServer).SendXMQ(ctx, req.(*SendXMQReq))
}
return interceptor(ctx, in, info, handler)
}
func _XMQService_BatchLose_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ResendXMQReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(XMQServiceServer).BatchLose(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: XMQService_BatchLose_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(XMQServiceServer).BatchLose(ctx, req.(*ResendXMQReq))
}
return interceptor(ctx, in, info, handler)
}
func _XMQService_BatchResend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ResendXMQReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(XMQServiceServer).BatchResend(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: XMQService_BatchResend_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(XMQServiceServer).BatchResend(ctx, req.(*ResendXMQReq))
}
return interceptor(ctx, in, info, handler)
}
// XMQService_ServiceDesc is the grpc.ServiceDesc for XMQService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var XMQService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "XMQService",
HandlerType: (*XMQServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "SendXMQ",
Handler: _XMQService_SendXMQ_Handler,
},
{
MethodName: "BatchLose",
Handler: _XMQService_BatchLose_Handler,
},
{
MethodName: "BatchResend",
Handler: _XMQService_BatchResend_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "XMQService.proto",
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xlizy/rpc-interface.git
git@gitee.com:xlizy/rpc-interface.git
xlizy
rpc-interface
rpc-interface
v0.3.2

搜索帮助

0d507c66 1850385 C8b1a773 1850385