github.com/moqsien/xraycore@v1.8.5/app/stats/command/command_grpc.pb.go (about)

     1  // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
     2  // versions:
     3  // - protoc-gen-go-grpc v1.3.0
     4  // - protoc             v4.23.1
     5  // source: app/stats/command/command.proto
     6  
     7  package command
     8  
     9  import (
    10  	context "context"
    11  	grpc "google.golang.org/grpc"
    12  	codes "google.golang.org/grpc/codes"
    13  	status "google.golang.org/grpc/status"
    14  )
    15  
    16  // This is a compile-time assertion to ensure that this generated file
    17  // is compatible with the grpc package it is being compiled against.
    18  // Requires gRPC-Go v1.32.0 or later.
    19  const _ = grpc.SupportPackageIsVersion7
    20  
    21  const (
    22  	StatsService_GetStats_FullMethodName    = "/xray.app.stats.command.StatsService/GetStats"
    23  	StatsService_QueryStats_FullMethodName  = "/xray.app.stats.command.StatsService/QueryStats"
    24  	StatsService_GetSysStats_FullMethodName = "/xray.app.stats.command.StatsService/GetSysStats"
    25  )
    26  
    27  // StatsServiceClient is the client API for StatsService service.
    28  //
    29  // 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.
    30  type StatsServiceClient interface {
    31  	GetStats(ctx context.Context, in *GetStatsRequest, opts ...grpc.CallOption) (*GetStatsResponse, error)
    32  	QueryStats(ctx context.Context, in *QueryStatsRequest, opts ...grpc.CallOption) (*QueryStatsResponse, error)
    33  	GetSysStats(ctx context.Context, in *SysStatsRequest, opts ...grpc.CallOption) (*SysStatsResponse, error)
    34  }
    35  
    36  type statsServiceClient struct {
    37  	cc grpc.ClientConnInterface
    38  }
    39  
    40  func NewStatsServiceClient(cc grpc.ClientConnInterface) StatsServiceClient {
    41  	return &statsServiceClient{cc}
    42  }
    43  
    44  func (c *statsServiceClient) GetStats(ctx context.Context, in *GetStatsRequest, opts ...grpc.CallOption) (*GetStatsResponse, error) {
    45  	out := new(GetStatsResponse)
    46  	err := c.cc.Invoke(ctx, StatsService_GetStats_FullMethodName, in, out, opts...)
    47  	if err != nil {
    48  		return nil, err
    49  	}
    50  	return out, nil
    51  }
    52  
    53  func (c *statsServiceClient) QueryStats(ctx context.Context, in *QueryStatsRequest, opts ...grpc.CallOption) (*QueryStatsResponse, error) {
    54  	out := new(QueryStatsResponse)
    55  	err := c.cc.Invoke(ctx, StatsService_QueryStats_FullMethodName, in, out, opts...)
    56  	if err != nil {
    57  		return nil, err
    58  	}
    59  	return out, nil
    60  }
    61  
    62  func (c *statsServiceClient) GetSysStats(ctx context.Context, in *SysStatsRequest, opts ...grpc.CallOption) (*SysStatsResponse, error) {
    63  	out := new(SysStatsResponse)
    64  	err := c.cc.Invoke(ctx, StatsService_GetSysStats_FullMethodName, in, out, opts...)
    65  	if err != nil {
    66  		return nil, err
    67  	}
    68  	return out, nil
    69  }
    70  
    71  // StatsServiceServer is the server API for StatsService service.
    72  // All implementations must embed UnimplementedStatsServiceServer
    73  // for forward compatibility
    74  type StatsServiceServer interface {
    75  	GetStats(context.Context, *GetStatsRequest) (*GetStatsResponse, error)
    76  	QueryStats(context.Context, *QueryStatsRequest) (*QueryStatsResponse, error)
    77  	GetSysStats(context.Context, *SysStatsRequest) (*SysStatsResponse, error)
    78  	mustEmbedUnimplementedStatsServiceServer()
    79  }
    80  
    81  // UnimplementedStatsServiceServer must be embedded to have forward compatible implementations.
    82  type UnimplementedStatsServiceServer struct {
    83  }
    84  
    85  func (UnimplementedStatsServiceServer) GetStats(context.Context, *GetStatsRequest) (*GetStatsResponse, error) {
    86  	return nil, status.Errorf(codes.Unimplemented, "method GetStats not implemented")
    87  }
    88  func (UnimplementedStatsServiceServer) QueryStats(context.Context, *QueryStatsRequest) (*QueryStatsResponse, error) {
    89  	return nil, status.Errorf(codes.Unimplemented, "method QueryStats not implemented")
    90  }
    91  func (UnimplementedStatsServiceServer) GetSysStats(context.Context, *SysStatsRequest) (*SysStatsResponse, error) {
    92  	return nil, status.Errorf(codes.Unimplemented, "method GetSysStats not implemented")
    93  }
    94  func (UnimplementedStatsServiceServer) mustEmbedUnimplementedStatsServiceServer() {}
    95  
    96  // UnsafeStatsServiceServer may be embedded to opt out of forward compatibility for this service.
    97  // Use of this interface is not recommended, as added methods to StatsServiceServer will
    98  // result in compilation errors.
    99  type UnsafeStatsServiceServer interface {
   100  	mustEmbedUnimplementedStatsServiceServer()
   101  }
   102  
   103  func RegisterStatsServiceServer(s grpc.ServiceRegistrar, srv StatsServiceServer) {
   104  	s.RegisterService(&StatsService_ServiceDesc, srv)
   105  }
   106  
   107  func _StatsService_GetStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   108  	in := new(GetStatsRequest)
   109  	if err := dec(in); err != nil {
   110  		return nil, err
   111  	}
   112  	if interceptor == nil {
   113  		return srv.(StatsServiceServer).GetStats(ctx, in)
   114  	}
   115  	info := &grpc.UnaryServerInfo{
   116  		Server:     srv,
   117  		FullMethod: StatsService_GetStats_FullMethodName,
   118  	}
   119  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   120  		return srv.(StatsServiceServer).GetStats(ctx, req.(*GetStatsRequest))
   121  	}
   122  	return interceptor(ctx, in, info, handler)
   123  }
   124  
   125  func _StatsService_QueryStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   126  	in := new(QueryStatsRequest)
   127  	if err := dec(in); err != nil {
   128  		return nil, err
   129  	}
   130  	if interceptor == nil {
   131  		return srv.(StatsServiceServer).QueryStats(ctx, in)
   132  	}
   133  	info := &grpc.UnaryServerInfo{
   134  		Server:     srv,
   135  		FullMethod: StatsService_QueryStats_FullMethodName,
   136  	}
   137  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   138  		return srv.(StatsServiceServer).QueryStats(ctx, req.(*QueryStatsRequest))
   139  	}
   140  	return interceptor(ctx, in, info, handler)
   141  }
   142  
   143  func _StatsService_GetSysStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   144  	in := new(SysStatsRequest)
   145  	if err := dec(in); err != nil {
   146  		return nil, err
   147  	}
   148  	if interceptor == nil {
   149  		return srv.(StatsServiceServer).GetSysStats(ctx, in)
   150  	}
   151  	info := &grpc.UnaryServerInfo{
   152  		Server:     srv,
   153  		FullMethod: StatsService_GetSysStats_FullMethodName,
   154  	}
   155  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   156  		return srv.(StatsServiceServer).GetSysStats(ctx, req.(*SysStatsRequest))
   157  	}
   158  	return interceptor(ctx, in, info, handler)
   159  }
   160  
   161  // StatsService_ServiceDesc is the grpc.ServiceDesc for StatsService service.
   162  // It's only intended for direct use with grpc.RegisterService,
   163  // and not to be introspected or modified (even as a copy)
   164  var StatsService_ServiceDesc = grpc.ServiceDesc{
   165  	ServiceName: "xray.app.stats.command.StatsService",
   166  	HandlerType: (*StatsServiceServer)(nil),
   167  	Methods: []grpc.MethodDesc{
   168  		{
   169  			MethodName: "GetStats",
   170  			Handler:    _StatsService_GetStats_Handler,
   171  		},
   172  		{
   173  			MethodName: "QueryStats",
   174  			Handler:    _StatsService_QueryStats_Handler,
   175  		},
   176  		{
   177  			MethodName: "GetSysStats",
   178  			Handler:    _StatsService_GetSysStats_Handler,
   179  		},
   180  	},
   181  	Streams:  []grpc.StreamDesc{},
   182  	Metadata: "app/stats/command/command.proto",
   183  }