617 lines
21 KiB
Go
617 lines
21 KiB
Go
// 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"
|
|
Hub_PubShardsStore_FullMethodName = "/hubrpc.Hub/PubShardsStore"
|
|
Hub_PubShardsInfo_FullMethodName = "/hubrpc.Hub/PubShardsInfo"
|
|
Hub_PubShardsListAll_FullMethodName = "/hubrpc.Hub/PubShardsListAll"
|
|
Hub_PubShardsGC_FullMethodName = "/hubrpc.Hub/PubShardsGC"
|
|
Hub_PubShardsStats_FullMethodName = "/hubrpc.Hub/PubShardsStats"
|
|
)
|
|
|
|
// 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)
|
|
PubShardsStore(ctx context.Context, in *rpc.Request, opts ...grpc.CallOption) (*rpc.Response, error)
|
|
PubShardsInfo(ctx context.Context, in *rpc.Request, opts ...grpc.CallOption) (*rpc.Response, error)
|
|
PubShardsListAll(ctx context.Context, in *rpc.Request, opts ...grpc.CallOption) (*rpc.Response, error)
|
|
PubShardsGC(ctx context.Context, in *rpc.Request, opts ...grpc.CallOption) (*rpc.Response, error)
|
|
PubShardsStats(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
|
|
}
|
|
|
|
func (c *hubClient) PubShardsStore(ctx context.Context, in *rpc.Request, opts ...grpc.CallOption) (*rpc.Response, error) {
|
|
out := new(rpc.Response)
|
|
err := c.cc.Invoke(ctx, Hub_PubShardsStore_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *hubClient) PubShardsInfo(ctx context.Context, in *rpc.Request, opts ...grpc.CallOption) (*rpc.Response, error) {
|
|
out := new(rpc.Response)
|
|
err := c.cc.Invoke(ctx, Hub_PubShardsInfo_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *hubClient) PubShardsListAll(ctx context.Context, in *rpc.Request, opts ...grpc.CallOption) (*rpc.Response, error) {
|
|
out := new(rpc.Response)
|
|
err := c.cc.Invoke(ctx, Hub_PubShardsListAll_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *hubClient) PubShardsGC(ctx context.Context, in *rpc.Request, opts ...grpc.CallOption) (*rpc.Response, error) {
|
|
out := new(rpc.Response)
|
|
err := c.cc.Invoke(ctx, Hub_PubShardsGC_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *hubClient) PubShardsStats(ctx context.Context, in *rpc.Request, opts ...grpc.CallOption) (*rpc.Response, error) {
|
|
out := new(rpc.Response)
|
|
err := c.cc.Invoke(ctx, Hub_PubShardsStats_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)
|
|
PubShardsStore(context.Context, *rpc.Request) (*rpc.Response, error)
|
|
PubShardsInfo(context.Context, *rpc.Request) (*rpc.Response, error)
|
|
PubShardsListAll(context.Context, *rpc.Request) (*rpc.Response, error)
|
|
PubShardsGC(context.Context, *rpc.Request) (*rpc.Response, error)
|
|
PubShardsStats(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) PubShardsStore(context.Context, *rpc.Request) (*rpc.Response, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method PubShardsStore not implemented")
|
|
}
|
|
func (UnimplementedHubServer) PubShardsInfo(context.Context, *rpc.Request) (*rpc.Response, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method PubShardsInfo not implemented")
|
|
}
|
|
func (UnimplementedHubServer) PubShardsListAll(context.Context, *rpc.Request) (*rpc.Response, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method PubShardsListAll not implemented")
|
|
}
|
|
func (UnimplementedHubServer) PubShardsGC(context.Context, *rpc.Request) (*rpc.Response, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method PubShardsGC not implemented")
|
|
}
|
|
func (UnimplementedHubServer) PubShardsStats(context.Context, *rpc.Request) (*rpc.Response, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method PubShardsStats 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)
|
|
}
|
|
|
|
func _Hub_PubShardsStore_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).PubShardsStore(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Hub_PubShardsStore_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(HubServer).PubShardsStore(ctx, req.(*rpc.Request))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Hub_PubShardsInfo_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).PubShardsInfo(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Hub_PubShardsInfo_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(HubServer).PubShardsInfo(ctx, req.(*rpc.Request))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Hub_PubShardsListAll_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).PubShardsListAll(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Hub_PubShardsListAll_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(HubServer).PubShardsListAll(ctx, req.(*rpc.Request))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Hub_PubShardsGC_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).PubShardsGC(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Hub_PubShardsGC_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(HubServer).PubShardsGC(ctx, req.(*rpc.Request))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Hub_PubShardsStats_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).PubShardsStats(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Hub_PubShardsStats_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(HubServer).PubShardsStats(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,
|
|
},
|
|
{
|
|
MethodName: "PubShardsStore",
|
|
Handler: _Hub_PubShardsStore_Handler,
|
|
},
|
|
{
|
|
MethodName: "PubShardsInfo",
|
|
Handler: _Hub_PubShardsInfo_Handler,
|
|
},
|
|
{
|
|
MethodName: "PubShardsListAll",
|
|
Handler: _Hub_PubShardsListAll_Handler,
|
|
},
|
|
{
|
|
MethodName: "PubShardsGC",
|
|
Handler: _Hub_PubShardsGC_Handler,
|
|
},
|
|
{
|
|
MethodName: "PubShardsStats",
|
|
Handler: _Hub_PubShardsStats_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",
|
|
}
|