mse-go-demo/grpc/a-server/proto/b_api/b-api_grpc.pb.go (70 lines of code) (raw):

// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 // - protoc v3.19.0 // source: proto/b_api/b-api.proto package b_api 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 // BServiceClient is the client API for BService 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 BServiceClient interface { BMethod(ctx context.Context, in *BRequest, opts ...grpc.CallOption) (*BReply, error) } type bServiceClient struct { cc grpc.ClientConnInterface } func NewBServiceClient(cc grpc.ClientConnInterface) BServiceClient { return &bServiceClient{cc} } func (c *bServiceClient) BMethod(ctx context.Context, in *BRequest, opts ...grpc.CallOption) (*BReply, error) { out := new(BReply) err := c.cc.Invoke(ctx, "/b_api.BService/bMethod", in, out, opts...) if err != nil { return nil, err } return out, nil } // BServiceServer is the server API for BService service. // All implementations must embed UnimplementedBServiceServer // for forward compatibility type BServiceServer interface { BMethod(context.Context, *BRequest) (*BReply, error) mustEmbedUnimplementedBServiceServer() } // UnimplementedBServiceServer must be embedded to have forward compatible implementations. type UnimplementedBServiceServer struct { } func (UnimplementedBServiceServer) BMethod(context.Context, *BRequest) (*BReply, error) { return nil, status.Errorf(codes.Unimplemented, "method BMethod not implemented") } func (UnimplementedBServiceServer) mustEmbedUnimplementedBServiceServer() {} // UnsafeBServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to BServiceServer will // result in compilation errors. type UnsafeBServiceServer interface { mustEmbedUnimplementedBServiceServer() } func RegisterBServiceServer(s grpc.ServiceRegistrar, srv BServiceServer) { s.RegisterService(&BService_ServiceDesc, srv) } func _BService_BMethod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(BRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BServiceServer).BMethod(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/b_api.BService/bMethod", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BServiceServer).BMethod(ctx, req.(*BRequest)) } return interceptor(ctx, in, info, handler) } // BService_ServiceDesc is the grpc.ServiceDesc for BService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var BService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "b_api.BService", HandlerType: (*BServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "bMethod", Handler: _BService_BMethod_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/b_api/b-api.proto", }