gitee.com/ks-custle/core-gm@v0.0.0-20230922171213-b83bdd97b62c/grpc/channelz/grpc_channelz_v1/channelz_grpc.pb.go (about)

     1  // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
     2  // versions:
     3  // - protoc-gen-go-grpc v1.2.0
     4  // - protoc             v3.14.0
     5  // source: grpc/channelz/v1/channelz.proto
     6  
     7  package grpc_channelz_v1
     8  
     9  import (
    10  	context "context"
    11  	grpc "gitee.com/ks-custle/core-gm/grpc"
    12  	codes "gitee.com/ks-custle/core-gm/grpc/codes"
    13  	status "gitee.com/ks-custle/core-gm/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  // ChannelzClient is the client API for Channelz service.
    22  //
    23  // 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.
    24  type ChannelzClient interface {
    25  	// Gets all root channels (i.e. channels the application has directly
    26  	// created). This does not include subchannels nor non-top level channels.
    27  	GetTopChannels(ctx context.Context, in *GetTopChannelsRequest, opts ...grpc.CallOption) (*GetTopChannelsResponse, error)
    28  	// Gets all servers that exist in the process.
    29  	GetServers(ctx context.Context, in *GetServersRequest, opts ...grpc.CallOption) (*GetServersResponse, error)
    30  	// Returns a single Server, or else a NOT_FOUND code.
    31  	GetServer(ctx context.Context, in *GetServerRequest, opts ...grpc.CallOption) (*GetServerResponse, error)
    32  	// Gets all server sockets that exist in the process.
    33  	GetServerSockets(ctx context.Context, in *GetServerSocketsRequest, opts ...grpc.CallOption) (*GetServerSocketsResponse, error)
    34  	// Returns a single Channel, or else a NOT_FOUND code.
    35  	GetChannel(ctx context.Context, in *GetChannelRequest, opts ...grpc.CallOption) (*GetChannelResponse, error)
    36  	// Returns a single Subchannel, or else a NOT_FOUND code.
    37  	GetSubchannel(ctx context.Context, in *GetSubchannelRequest, opts ...grpc.CallOption) (*GetSubchannelResponse, error)
    38  	// Returns a single Socket or else a NOT_FOUND code.
    39  	GetSocket(ctx context.Context, in *GetSocketRequest, opts ...grpc.CallOption) (*GetSocketResponse, error)
    40  }
    41  
    42  type channelzClient struct {
    43  	cc grpc.ClientConnInterface
    44  }
    45  
    46  func NewChannelzClient(cc grpc.ClientConnInterface) ChannelzClient {
    47  	return &channelzClient{cc}
    48  }
    49  
    50  func (c *channelzClient) GetTopChannels(ctx context.Context, in *GetTopChannelsRequest, opts ...grpc.CallOption) (*GetTopChannelsResponse, error) {
    51  	out := new(GetTopChannelsResponse)
    52  	err := c.cc.Invoke(ctx, "/grpc.channelz.v1.Channelz/GetTopChannels", in, out, opts...)
    53  	if err != nil {
    54  		return nil, err
    55  	}
    56  	return out, nil
    57  }
    58  
    59  func (c *channelzClient) GetServers(ctx context.Context, in *GetServersRequest, opts ...grpc.CallOption) (*GetServersResponse, error) {
    60  	out := new(GetServersResponse)
    61  	err := c.cc.Invoke(ctx, "/grpc.channelz.v1.Channelz/GetServers", in, out, opts...)
    62  	if err != nil {
    63  		return nil, err
    64  	}
    65  	return out, nil
    66  }
    67  
    68  func (c *channelzClient) GetServer(ctx context.Context, in *GetServerRequest, opts ...grpc.CallOption) (*GetServerResponse, error) {
    69  	out := new(GetServerResponse)
    70  	err := c.cc.Invoke(ctx, "/grpc.channelz.v1.Channelz/GetServer", in, out, opts...)
    71  	if err != nil {
    72  		return nil, err
    73  	}
    74  	return out, nil
    75  }
    76  
    77  func (c *channelzClient) GetServerSockets(ctx context.Context, in *GetServerSocketsRequest, opts ...grpc.CallOption) (*GetServerSocketsResponse, error) {
    78  	out := new(GetServerSocketsResponse)
    79  	err := c.cc.Invoke(ctx, "/grpc.channelz.v1.Channelz/GetServerSockets", in, out, opts...)
    80  	if err != nil {
    81  		return nil, err
    82  	}
    83  	return out, nil
    84  }
    85  
    86  func (c *channelzClient) GetChannel(ctx context.Context, in *GetChannelRequest, opts ...grpc.CallOption) (*GetChannelResponse, error) {
    87  	out := new(GetChannelResponse)
    88  	err := c.cc.Invoke(ctx, "/grpc.channelz.v1.Channelz/GetChannel", in, out, opts...)
    89  	if err != nil {
    90  		return nil, err
    91  	}
    92  	return out, nil
    93  }
    94  
    95  func (c *channelzClient) GetSubchannel(ctx context.Context, in *GetSubchannelRequest, opts ...grpc.CallOption) (*GetSubchannelResponse, error) {
    96  	out := new(GetSubchannelResponse)
    97  	err := c.cc.Invoke(ctx, "/grpc.channelz.v1.Channelz/GetSubchannel", in, out, opts...)
    98  	if err != nil {
    99  		return nil, err
   100  	}
   101  	return out, nil
   102  }
   103  
   104  func (c *channelzClient) GetSocket(ctx context.Context, in *GetSocketRequest, opts ...grpc.CallOption) (*GetSocketResponse, error) {
   105  	out := new(GetSocketResponse)
   106  	err := c.cc.Invoke(ctx, "/grpc.channelz.v1.Channelz/GetSocket", in, out, opts...)
   107  	if err != nil {
   108  		return nil, err
   109  	}
   110  	return out, nil
   111  }
   112  
   113  // ChannelzServer is the server API for Channelz service.
   114  // All implementations should embed UnimplementedChannelzServer
   115  // for forward compatibility
   116  type ChannelzServer interface {
   117  	// Gets all root channels (i.e. channels the application has directly
   118  	// created). This does not include subchannels nor non-top level channels.
   119  	GetTopChannels(context.Context, *GetTopChannelsRequest) (*GetTopChannelsResponse, error)
   120  	// Gets all servers that exist in the process.
   121  	GetServers(context.Context, *GetServersRequest) (*GetServersResponse, error)
   122  	// Returns a single Server, or else a NOT_FOUND code.
   123  	GetServer(context.Context, *GetServerRequest) (*GetServerResponse, error)
   124  	// Gets all server sockets that exist in the process.
   125  	GetServerSockets(context.Context, *GetServerSocketsRequest) (*GetServerSocketsResponse, error)
   126  	// Returns a single Channel, or else a NOT_FOUND code.
   127  	GetChannel(context.Context, *GetChannelRequest) (*GetChannelResponse, error)
   128  	// Returns a single Subchannel, or else a NOT_FOUND code.
   129  	GetSubchannel(context.Context, *GetSubchannelRequest) (*GetSubchannelResponse, error)
   130  	// Returns a single Socket or else a NOT_FOUND code.
   131  	GetSocket(context.Context, *GetSocketRequest) (*GetSocketResponse, error)
   132  }
   133  
   134  // UnimplementedChannelzServer should be embedded to have forward compatible implementations.
   135  type UnimplementedChannelzServer struct {
   136  }
   137  
   138  func (UnimplementedChannelzServer) GetTopChannels(context.Context, *GetTopChannelsRequest) (*GetTopChannelsResponse, error) {
   139  	return nil, status.Errorf(codes.Unimplemented, "method GetTopChannels not implemented")
   140  }
   141  func (UnimplementedChannelzServer) GetServers(context.Context, *GetServersRequest) (*GetServersResponse, error) {
   142  	return nil, status.Errorf(codes.Unimplemented, "method GetServers not implemented")
   143  }
   144  func (UnimplementedChannelzServer) GetServer(context.Context, *GetServerRequest) (*GetServerResponse, error) {
   145  	return nil, status.Errorf(codes.Unimplemented, "method GetServer not implemented")
   146  }
   147  func (UnimplementedChannelzServer) GetServerSockets(context.Context, *GetServerSocketsRequest) (*GetServerSocketsResponse, error) {
   148  	return nil, status.Errorf(codes.Unimplemented, "method GetServerSockets not implemented")
   149  }
   150  func (UnimplementedChannelzServer) GetChannel(context.Context, *GetChannelRequest) (*GetChannelResponse, error) {
   151  	return nil, status.Errorf(codes.Unimplemented, "method GetChannel not implemented")
   152  }
   153  func (UnimplementedChannelzServer) GetSubchannel(context.Context, *GetSubchannelRequest) (*GetSubchannelResponse, error) {
   154  	return nil, status.Errorf(codes.Unimplemented, "method GetSubchannel not implemented")
   155  }
   156  func (UnimplementedChannelzServer) GetSocket(context.Context, *GetSocketRequest) (*GetSocketResponse, error) {
   157  	return nil, status.Errorf(codes.Unimplemented, "method GetSocket not implemented")
   158  }
   159  
   160  // UnsafeChannelzServer may be embedded to opt out of forward compatibility for this service.
   161  // Use of this interface is not recommended, as added methods to ChannelzServer will
   162  // result in compilation errors.
   163  type UnsafeChannelzServer interface {
   164  	mustEmbedUnimplementedChannelzServer()
   165  }
   166  
   167  func RegisterChannelzServer(s grpc.ServiceRegistrar, srv ChannelzServer) {
   168  	s.RegisterService(&Channelz_ServiceDesc, srv)
   169  }
   170  
   171  func _Channelz_GetTopChannels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   172  	in := new(GetTopChannelsRequest)
   173  	if err := dec(in); err != nil {
   174  		return nil, err
   175  	}
   176  	if interceptor == nil {
   177  		return srv.(ChannelzServer).GetTopChannels(ctx, in)
   178  	}
   179  	info := &grpc.UnaryServerInfo{
   180  		Server:     srv,
   181  		FullMethod: "/grpc.channelz.v1.Channelz/GetTopChannels",
   182  	}
   183  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   184  		return srv.(ChannelzServer).GetTopChannels(ctx, req.(*GetTopChannelsRequest))
   185  	}
   186  	return interceptor(ctx, in, info, handler)
   187  }
   188  
   189  func _Channelz_GetServers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   190  	in := new(GetServersRequest)
   191  	if err := dec(in); err != nil {
   192  		return nil, err
   193  	}
   194  	if interceptor == nil {
   195  		return srv.(ChannelzServer).GetServers(ctx, in)
   196  	}
   197  	info := &grpc.UnaryServerInfo{
   198  		Server:     srv,
   199  		FullMethod: "/grpc.channelz.v1.Channelz/GetServers",
   200  	}
   201  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   202  		return srv.(ChannelzServer).GetServers(ctx, req.(*GetServersRequest))
   203  	}
   204  	return interceptor(ctx, in, info, handler)
   205  }
   206  
   207  func _Channelz_GetServer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   208  	in := new(GetServerRequest)
   209  	if err := dec(in); err != nil {
   210  		return nil, err
   211  	}
   212  	if interceptor == nil {
   213  		return srv.(ChannelzServer).GetServer(ctx, in)
   214  	}
   215  	info := &grpc.UnaryServerInfo{
   216  		Server:     srv,
   217  		FullMethod: "/grpc.channelz.v1.Channelz/GetServer",
   218  	}
   219  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   220  		return srv.(ChannelzServer).GetServer(ctx, req.(*GetServerRequest))
   221  	}
   222  	return interceptor(ctx, in, info, handler)
   223  }
   224  
   225  func _Channelz_GetServerSockets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   226  	in := new(GetServerSocketsRequest)
   227  	if err := dec(in); err != nil {
   228  		return nil, err
   229  	}
   230  	if interceptor == nil {
   231  		return srv.(ChannelzServer).GetServerSockets(ctx, in)
   232  	}
   233  	info := &grpc.UnaryServerInfo{
   234  		Server:     srv,
   235  		FullMethod: "/grpc.channelz.v1.Channelz/GetServerSockets",
   236  	}
   237  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   238  		return srv.(ChannelzServer).GetServerSockets(ctx, req.(*GetServerSocketsRequest))
   239  	}
   240  	return interceptor(ctx, in, info, handler)
   241  }
   242  
   243  func _Channelz_GetChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   244  	in := new(GetChannelRequest)
   245  	if err := dec(in); err != nil {
   246  		return nil, err
   247  	}
   248  	if interceptor == nil {
   249  		return srv.(ChannelzServer).GetChannel(ctx, in)
   250  	}
   251  	info := &grpc.UnaryServerInfo{
   252  		Server:     srv,
   253  		FullMethod: "/grpc.channelz.v1.Channelz/GetChannel",
   254  	}
   255  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   256  		return srv.(ChannelzServer).GetChannel(ctx, req.(*GetChannelRequest))
   257  	}
   258  	return interceptor(ctx, in, info, handler)
   259  }
   260  
   261  func _Channelz_GetSubchannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   262  	in := new(GetSubchannelRequest)
   263  	if err := dec(in); err != nil {
   264  		return nil, err
   265  	}
   266  	if interceptor == nil {
   267  		return srv.(ChannelzServer).GetSubchannel(ctx, in)
   268  	}
   269  	info := &grpc.UnaryServerInfo{
   270  		Server:     srv,
   271  		FullMethod: "/grpc.channelz.v1.Channelz/GetSubchannel",
   272  	}
   273  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   274  		return srv.(ChannelzServer).GetSubchannel(ctx, req.(*GetSubchannelRequest))
   275  	}
   276  	return interceptor(ctx, in, info, handler)
   277  }
   278  
   279  func _Channelz_GetSocket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   280  	in := new(GetSocketRequest)
   281  	if err := dec(in); err != nil {
   282  		return nil, err
   283  	}
   284  	if interceptor == nil {
   285  		return srv.(ChannelzServer).GetSocket(ctx, in)
   286  	}
   287  	info := &grpc.UnaryServerInfo{
   288  		Server:     srv,
   289  		FullMethod: "/grpc.channelz.v1.Channelz/GetSocket",
   290  	}
   291  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   292  		return srv.(ChannelzServer).GetSocket(ctx, req.(*GetSocketRequest))
   293  	}
   294  	return interceptor(ctx, in, info, handler)
   295  }
   296  
   297  // Channelz_ServiceDesc is the grpc.ServiceDesc for Channelz service.
   298  // It's only intended for direct use with grpc.RegisterService,
   299  // and not to be introspected or modified (even as a copy)
   300  var Channelz_ServiceDesc = grpc.ServiceDesc{
   301  	ServiceName: "grpc.channelz.v1.Channelz",
   302  	HandlerType: (*ChannelzServer)(nil),
   303  	Methods: []grpc.MethodDesc{
   304  		{
   305  			MethodName: "GetTopChannels",
   306  			Handler:    _Channelz_GetTopChannels_Handler,
   307  		},
   308  		{
   309  			MethodName: "GetServers",
   310  			Handler:    _Channelz_GetServers_Handler,
   311  		},
   312  		{
   313  			MethodName: "GetServer",
   314  			Handler:    _Channelz_GetServer_Handler,
   315  		},
   316  		{
   317  			MethodName: "GetServerSockets",
   318  			Handler:    _Channelz_GetServerSockets_Handler,
   319  		},
   320  		{
   321  			MethodName: "GetChannel",
   322  			Handler:    _Channelz_GetChannel_Handler,
   323  		},
   324  		{
   325  			MethodName: "GetSubchannel",
   326  			Handler:    _Channelz_GetSubchannel_Handler,
   327  		},
   328  		{
   329  			MethodName: "GetSocket",
   330  			Handler:    _Channelz_GetSocket_Handler,
   331  		},
   332  	},
   333  	Streams:  []grpc.StreamDesc{},
   334  	Metadata: "grpc/channelz/v1/channelz.proto",
   335  }