// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc v3.20.0--rc1 // source: manifest/proto/rpc.proto package 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 const ( BothWayStreamServer_Call_FullMethodName = "/api.BothWayStreamServer/Call" ) // BothWayStreamServerClient is the client API for BothWayStreamServer 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 BothWayStreamServerClient interface { // 双向流连接 - 用于注册和函数调用 Call(ctx context.Context, opts ...grpc.CallOption) (BothWayStreamServer_CallClient, error) } type bothWayStreamServerClient struct { cc grpc.ClientConnInterface } func NewBothWayStreamServerClient(cc grpc.ClientConnInterface) BothWayStreamServerClient { return &bothWayStreamServerClient{cc} } func (c *bothWayStreamServerClient) Call(ctx context.Context, opts ...grpc.CallOption) (BothWayStreamServer_CallClient, error) { stream, err := c.cc.NewStream(ctx, &BothWayStreamServer_ServiceDesc.Streams[0], BothWayStreamServer_Call_FullMethodName, opts...) if err != nil { return nil, err } x := &bothWayStreamServerCallClient{stream} return x, nil } type BothWayStreamServer_CallClient interface { Send(*GenericMessage) error Recv() (*GenericMessage, error) grpc.ClientStream } type bothWayStreamServerCallClient struct { grpc.ClientStream } func (x *bothWayStreamServerCallClient) Send(m *GenericMessage) error { return x.ClientStream.SendMsg(m) } func (x *bothWayStreamServerCallClient) Recv() (*GenericMessage, error) { m := new(GenericMessage) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } // BothWayStreamServerServer is the server API for BothWayStreamServer service. // All implementations must embed UnimplementedBothWayStreamServerServer // for forward compatibility type BothWayStreamServerServer interface { // 双向流连接 - 用于注册和函数调用 Call(BothWayStreamServer_CallServer) error mustEmbedUnimplementedBothWayStreamServerServer() } // UnimplementedBothWayStreamServerServer must be embedded to have forward compatible implementations. type UnimplementedBothWayStreamServerServer struct { } func (UnimplementedBothWayStreamServerServer) Call(BothWayStreamServer_CallServer) error { return status.Errorf(codes.Unimplemented, "method Call not implemented") } func (UnimplementedBothWayStreamServerServer) mustEmbedUnimplementedBothWayStreamServerServer() {} // UnsafeBothWayStreamServerServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to BothWayStreamServerServer will // result in compilation errors. type UnsafeBothWayStreamServerServer interface { mustEmbedUnimplementedBothWayStreamServerServer() } func RegisterBothWayStreamServerServer(s grpc.ServiceRegistrar, srv BothWayStreamServerServer) { s.RegisterService(&BothWayStreamServer_ServiceDesc, srv) } func _BothWayStreamServer_Call_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(BothWayStreamServerServer).Call(&bothWayStreamServerCallServer{stream}) } type BothWayStreamServer_CallServer interface { Send(*GenericMessage) error Recv() (*GenericMessage, error) grpc.ServerStream } type bothWayStreamServerCallServer struct { grpc.ServerStream } func (x *bothWayStreamServerCallServer) Send(m *GenericMessage) error { return x.ServerStream.SendMsg(m) } func (x *bothWayStreamServerCallServer) Recv() (*GenericMessage, error) { m := new(GenericMessage) if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } return m, nil } // BothWayStreamServer_ServiceDesc is the grpc.ServiceDesc for BothWayStreamServer service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var BothWayStreamServer_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.BothWayStreamServer", HandlerType: (*BothWayStreamServerServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Call", Handler: _BothWayStreamServer_Call_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "manifest/proto/rpc.proto", }