// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc v4.22.3 // source: pkgs/rpc/hub/hub.proto package hubrpc import ( context "context" rpc "gitlink.org.cn/cloudream/jcs-pub/common/pkgs/rpc" 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 ( Hub_ExecuteIOPlan_FullMethodName = "/hubrpc.Hub/ExecuteIOPlan" Hub_SendIOStream_FullMethodName = "/hubrpc.Hub/SendIOStream" Hub_GetIOStream_FullMethodName = "/hubrpc.Hub/GetIOStream" Hub_SendIOVar_FullMethodName = "/hubrpc.Hub/SendIOVar" Hub_GetIOVar_FullMethodName = "/hubrpc.Hub/GetIOVar" Hub_Ping_FullMethodName = "/hubrpc.Hub/Ping" Hub_GetState_FullMethodName = "/hubrpc.Hub/GetState" Hub_NotifyUserAccessTokenInvalid_FullMethodName = "/hubrpc.Hub/NotifyUserAccessTokenInvalid" ) // HubClient is the client API for Hub 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 HubClient interface { ExecuteIOPlan(ctx context.Context, in *rpc.Request, opts ...grpc.CallOption) (*rpc.Response, error) SendIOStream(ctx context.Context, opts ...grpc.CallOption) (Hub_SendIOStreamClient, error) GetIOStream(ctx context.Context, in *rpc.Request, opts ...grpc.CallOption) (Hub_GetIOStreamClient, error) SendIOVar(ctx context.Context, in *rpc.Request, opts ...grpc.CallOption) (*rpc.Response, error) GetIOVar(ctx context.Context, in *rpc.Request, opts ...grpc.CallOption) (*rpc.Response, error) Ping(ctx context.Context, in *rpc.Request, opts ...grpc.CallOption) (*rpc.Response, error) GetState(ctx context.Context, in *rpc.Request, opts ...grpc.CallOption) (*rpc.Response, error) NotifyUserAccessTokenInvalid(ctx context.Context, in *rpc.Request, opts ...grpc.CallOption) (*rpc.Response, error) } type hubClient struct { cc grpc.ClientConnInterface } func NewHubClient(cc grpc.ClientConnInterface) HubClient { return &hubClient{cc} } func (c *hubClient) ExecuteIOPlan(ctx context.Context, in *rpc.Request, opts ...grpc.CallOption) (*rpc.Response, error) { out := new(rpc.Response) err := c.cc.Invoke(ctx, Hub_ExecuteIOPlan_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *hubClient) SendIOStream(ctx context.Context, opts ...grpc.CallOption) (Hub_SendIOStreamClient, error) { stream, err := c.cc.NewStream(ctx, &Hub_ServiceDesc.Streams[0], Hub_SendIOStream_FullMethodName, opts...) if err != nil { return nil, err } x := &hubSendIOStreamClient{stream} return x, nil } type Hub_SendIOStreamClient interface { Send(*rpc.ChunkedData) error CloseAndRecv() (*rpc.Response, error) grpc.ClientStream } type hubSendIOStreamClient struct { grpc.ClientStream } func (x *hubSendIOStreamClient) Send(m *rpc.ChunkedData) error { return x.ClientStream.SendMsg(m) } func (x *hubSendIOStreamClient) CloseAndRecv() (*rpc.Response, error) { if err := x.ClientStream.CloseSend(); err != nil { return nil, err } m := new(rpc.Response) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func (c *hubClient) GetIOStream(ctx context.Context, in *rpc.Request, opts ...grpc.CallOption) (Hub_GetIOStreamClient, error) { stream, err := c.cc.NewStream(ctx, &Hub_ServiceDesc.Streams[1], Hub_GetIOStream_FullMethodName, opts...) if err != nil { return nil, err } x := &hubGetIOStreamClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } if err := x.ClientStream.CloseSend(); err != nil { return nil, err } return x, nil } type Hub_GetIOStreamClient interface { Recv() (*rpc.ChunkedData, error) grpc.ClientStream } type hubGetIOStreamClient struct { grpc.ClientStream } func (x *hubGetIOStreamClient) Recv() (*rpc.ChunkedData, error) { m := new(rpc.ChunkedData) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func (c *hubClient) SendIOVar(ctx context.Context, in *rpc.Request, opts ...grpc.CallOption) (*rpc.Response, error) { out := new(rpc.Response) err := c.cc.Invoke(ctx, Hub_SendIOVar_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *hubClient) GetIOVar(ctx context.Context, in *rpc.Request, opts ...grpc.CallOption) (*rpc.Response, error) { out := new(rpc.Response) err := c.cc.Invoke(ctx, Hub_GetIOVar_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *hubClient) Ping(ctx context.Context, in *rpc.Request, opts ...grpc.CallOption) (*rpc.Response, error) { out := new(rpc.Response) err := c.cc.Invoke(ctx, Hub_Ping_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *hubClient) GetState(ctx context.Context, in *rpc.Request, opts ...grpc.CallOption) (*rpc.Response, error) { out := new(rpc.Response) err := c.cc.Invoke(ctx, Hub_GetState_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *hubClient) NotifyUserAccessTokenInvalid(ctx context.Context, in *rpc.Request, opts ...grpc.CallOption) (*rpc.Response, error) { out := new(rpc.Response) err := c.cc.Invoke(ctx, Hub_NotifyUserAccessTokenInvalid_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // HubServer is the server API for Hub service. // All implementations must embed UnimplementedHubServer // for forward compatibility type HubServer interface { ExecuteIOPlan(context.Context, *rpc.Request) (*rpc.Response, error) SendIOStream(Hub_SendIOStreamServer) error GetIOStream(*rpc.Request, Hub_GetIOStreamServer) error SendIOVar(context.Context, *rpc.Request) (*rpc.Response, error) GetIOVar(context.Context, *rpc.Request) (*rpc.Response, error) Ping(context.Context, *rpc.Request) (*rpc.Response, error) GetState(context.Context, *rpc.Request) (*rpc.Response, error) NotifyUserAccessTokenInvalid(context.Context, *rpc.Request) (*rpc.Response, error) mustEmbedUnimplementedHubServer() } // UnimplementedHubServer must be embedded to have forward compatible implementations. type UnimplementedHubServer struct { } func (UnimplementedHubServer) ExecuteIOPlan(context.Context, *rpc.Request) (*rpc.Response, error) { return nil, status.Errorf(codes.Unimplemented, "method ExecuteIOPlan not implemented") } func (UnimplementedHubServer) SendIOStream(Hub_SendIOStreamServer) error { return status.Errorf(codes.Unimplemented, "method SendIOStream not implemented") } func (UnimplementedHubServer) GetIOStream(*rpc.Request, Hub_GetIOStreamServer) error { return status.Errorf(codes.Unimplemented, "method GetIOStream not implemented") } func (UnimplementedHubServer) SendIOVar(context.Context, *rpc.Request) (*rpc.Response, error) { return nil, status.Errorf(codes.Unimplemented, "method SendIOVar not implemented") } func (UnimplementedHubServer) GetIOVar(context.Context, *rpc.Request) (*rpc.Response, error) { return nil, status.Errorf(codes.Unimplemented, "method GetIOVar not implemented") } func (UnimplementedHubServer) Ping(context.Context, *rpc.Request) (*rpc.Response, error) { return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") } func (UnimplementedHubServer) GetState(context.Context, *rpc.Request) (*rpc.Response, error) { return nil, status.Errorf(codes.Unimplemented, "method GetState not implemented") } func (UnimplementedHubServer) NotifyUserAccessTokenInvalid(context.Context, *rpc.Request) (*rpc.Response, error) { return nil, status.Errorf(codes.Unimplemented, "method NotifyUserAccessTokenInvalid not implemented") } func (UnimplementedHubServer) mustEmbedUnimplementedHubServer() {} // UnsafeHubServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to HubServer will // result in compilation errors. type UnsafeHubServer interface { mustEmbedUnimplementedHubServer() } func RegisterHubServer(s grpc.ServiceRegistrar, srv HubServer) { s.RegisterService(&Hub_ServiceDesc, srv) } func _Hub_ExecuteIOPlan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(rpc.Request) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(HubServer).ExecuteIOPlan(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Hub_ExecuteIOPlan_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(HubServer).ExecuteIOPlan(ctx, req.(*rpc.Request)) } return interceptor(ctx, in, info, handler) } func _Hub_SendIOStream_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(HubServer).SendIOStream(&hubSendIOStreamServer{stream}) } type Hub_SendIOStreamServer interface { SendAndClose(*rpc.Response) error Recv() (*rpc.ChunkedData, error) grpc.ServerStream } type hubSendIOStreamServer struct { grpc.ServerStream } func (x *hubSendIOStreamServer) SendAndClose(m *rpc.Response) error { return x.ServerStream.SendMsg(m) } func (x *hubSendIOStreamServer) Recv() (*rpc.ChunkedData, error) { m := new(rpc.ChunkedData) if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func _Hub_GetIOStream_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(rpc.Request) if err := stream.RecvMsg(m); err != nil { return err } return srv.(HubServer).GetIOStream(m, &hubGetIOStreamServer{stream}) } type Hub_GetIOStreamServer interface { Send(*rpc.ChunkedData) error grpc.ServerStream } type hubGetIOStreamServer struct { grpc.ServerStream } func (x *hubGetIOStreamServer) Send(m *rpc.ChunkedData) error { return x.ServerStream.SendMsg(m) } func _Hub_SendIOVar_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(rpc.Request) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(HubServer).SendIOVar(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Hub_SendIOVar_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(HubServer).SendIOVar(ctx, req.(*rpc.Request)) } return interceptor(ctx, in, info, handler) } func _Hub_GetIOVar_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(rpc.Request) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(HubServer).GetIOVar(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Hub_GetIOVar_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(HubServer).GetIOVar(ctx, req.(*rpc.Request)) } return interceptor(ctx, in, info, handler) } func _Hub_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(rpc.Request) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(HubServer).Ping(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Hub_Ping_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(HubServer).Ping(ctx, req.(*rpc.Request)) } return interceptor(ctx, in, info, handler) } func _Hub_GetState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(rpc.Request) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(HubServer).GetState(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Hub_GetState_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(HubServer).GetState(ctx, req.(*rpc.Request)) } return interceptor(ctx, in, info, handler) } func _Hub_NotifyUserAccessTokenInvalid_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(rpc.Request) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(HubServer).NotifyUserAccessTokenInvalid(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Hub_NotifyUserAccessTokenInvalid_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(HubServer).NotifyUserAccessTokenInvalid(ctx, req.(*rpc.Request)) } return interceptor(ctx, in, info, handler) } // Hub_ServiceDesc is the grpc.ServiceDesc for Hub service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Hub_ServiceDesc = grpc.ServiceDesc{ ServiceName: "hubrpc.Hub", HandlerType: (*HubServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ExecuteIOPlan", Handler: _Hub_ExecuteIOPlan_Handler, }, { MethodName: "SendIOVar", Handler: _Hub_SendIOVar_Handler, }, { MethodName: "GetIOVar", Handler: _Hub_GetIOVar_Handler, }, { MethodName: "Ping", Handler: _Hub_Ping_Handler, }, { MethodName: "GetState", Handler: _Hub_GetState_Handler, }, { MethodName: "NotifyUserAccessTokenInvalid", Handler: _Hub_NotifyUserAccessTokenInvalid_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "SendIOStream", Handler: _Hub_SendIOStream_Handler, ClientStreams: true, }, { StreamName: "GetIOStream", Handler: _Hub_GetIOStream_Handler, ServerStreams: true, }, }, Metadata: "pkgs/rpc/hub/hub.proto", }