...

Source file src/google.golang.org/grpc/interop/grpc_testing/test_grpc.pb.go

Documentation: google.golang.org/grpc/interop/grpc_testing

     1  // Copyright 2015-2016 gRPC authors.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  // An integration test service that covers all the method signature permutations
    16  // of unary/streaming requests/responses.
    17  
    18  // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
    19  // versions:
    20  // - protoc-gen-go-grpc v1.3.0
    21  // - protoc             v4.25.2
    22  // source: grpc/testing/test.proto
    23  
    24  package grpc_testing
    25  
    26  import (
    27  	context "context"
    28  	grpc "google.golang.org/grpc"
    29  	codes "google.golang.org/grpc/codes"
    30  	status "google.golang.org/grpc/status"
    31  )
    32  
    33  // This is a compile-time assertion to ensure that this generated file
    34  // is compatible with the grpc package it is being compiled against.
    35  // Requires gRPC-Go v1.64.0 or later.
    36  const _ = grpc.SupportPackageIsVersion9
    37  
    38  const (
    39  	TestService_EmptyCall_FullMethodName           = "/grpc.testing.TestService/EmptyCall"
    40  	TestService_UnaryCall_FullMethodName           = "/grpc.testing.TestService/UnaryCall"
    41  	TestService_CacheableUnaryCall_FullMethodName  = "/grpc.testing.TestService/CacheableUnaryCall"
    42  	TestService_StreamingOutputCall_FullMethodName = "/grpc.testing.TestService/StreamingOutputCall"
    43  	TestService_StreamingInputCall_FullMethodName  = "/grpc.testing.TestService/StreamingInputCall"
    44  	TestService_FullDuplexCall_FullMethodName      = "/grpc.testing.TestService/FullDuplexCall"
    45  	TestService_HalfDuplexCall_FullMethodName      = "/grpc.testing.TestService/HalfDuplexCall"
    46  	TestService_UnimplementedCall_FullMethodName   = "/grpc.testing.TestService/UnimplementedCall"
    47  )
    48  
    49  // TestServiceClient is the client API for TestService service.
    50  //
    51  // 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.
    52  type TestServiceClient interface {
    53  	// One empty request followed by one empty response.
    54  	EmptyCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
    55  	// One request followed by one response.
    56  	UnaryCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error)
    57  	// One request followed by one response. Response has cache control
    58  	// headers set such that a caching HTTP proxy (such as GFE) can
    59  	// satisfy subsequent requests.
    60  	CacheableUnaryCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error)
    61  	// One request followed by a sequence of responses (streamed download).
    62  	// The server returns the payload with client desired type and sizes.
    63  	StreamingOutputCall(ctx context.Context, in *StreamingOutputCallRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamingOutputCallResponse], error)
    64  	// A sequence of requests followed by one response (streamed upload).
    65  	// The server returns the aggregated size of client payload as the result.
    66  	StreamingInputCall(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[StreamingInputCallRequest, StreamingInputCallResponse], error)
    67  	// A sequence of requests with each request served by the server immediately.
    68  	// As one request could lead to multiple responses, this interface
    69  	// demonstrates the idea of full duplexing.
    70  	FullDuplexCall(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[StreamingOutputCallRequest, StreamingOutputCallResponse], error)
    71  	// A sequence of requests followed by a sequence of responses.
    72  	// The server buffers all the client requests and then serves them in order. A
    73  	// stream of responses are returned to the client when the server starts with
    74  	// first request.
    75  	HalfDuplexCall(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[StreamingOutputCallRequest, StreamingOutputCallResponse], error)
    76  	// The test server will not implement this method. It will be used
    77  	// to test the behavior when clients call unimplemented methods.
    78  	UnimplementedCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
    79  }
    80  
    81  type testServiceClient struct {
    82  	cc grpc.ClientConnInterface
    83  }
    84  
    85  func NewTestServiceClient(cc grpc.ClientConnInterface) TestServiceClient {
    86  	return &testServiceClient{cc}
    87  }
    88  
    89  func (c *testServiceClient) EmptyCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
    90  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
    91  	out := new(Empty)
    92  	err := c.cc.Invoke(ctx, TestService_EmptyCall_FullMethodName, in, out, cOpts...)
    93  	if err != nil {
    94  		return nil, err
    95  	}
    96  	return out, nil
    97  }
    98  
    99  func (c *testServiceClient) UnaryCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error) {
   100  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   101  	out := new(SimpleResponse)
   102  	err := c.cc.Invoke(ctx, TestService_UnaryCall_FullMethodName, in, out, cOpts...)
   103  	if err != nil {
   104  		return nil, err
   105  	}
   106  	return out, nil
   107  }
   108  
   109  func (c *testServiceClient) CacheableUnaryCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error) {
   110  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   111  	out := new(SimpleResponse)
   112  	err := c.cc.Invoke(ctx, TestService_CacheableUnaryCall_FullMethodName, in, out, cOpts...)
   113  	if err != nil {
   114  		return nil, err
   115  	}
   116  	return out, nil
   117  }
   118  
   119  func (c *testServiceClient) StreamingOutputCall(ctx context.Context, in *StreamingOutputCallRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamingOutputCallResponse], error) {
   120  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   121  	stream, err := c.cc.NewStream(ctx, &TestService_ServiceDesc.Streams[0], TestService_StreamingOutputCall_FullMethodName, cOpts...)
   122  	if err != nil {
   123  		return nil, err
   124  	}
   125  	x := &grpc.GenericClientStream[StreamingOutputCallRequest, StreamingOutputCallResponse]{ClientStream: stream}
   126  	if err := x.ClientStream.SendMsg(in); err != nil {
   127  		return nil, err
   128  	}
   129  	if err := x.ClientStream.CloseSend(); err != nil {
   130  		return nil, err
   131  	}
   132  	return x, nil
   133  }
   134  
   135  // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
   136  type TestService_StreamingOutputCallClient = grpc.ServerStreamingClient[StreamingOutputCallResponse]
   137  
   138  func (c *testServiceClient) StreamingInputCall(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[StreamingInputCallRequest, StreamingInputCallResponse], error) {
   139  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   140  	stream, err := c.cc.NewStream(ctx, &TestService_ServiceDesc.Streams[1], TestService_StreamingInputCall_FullMethodName, cOpts...)
   141  	if err != nil {
   142  		return nil, err
   143  	}
   144  	x := &grpc.GenericClientStream[StreamingInputCallRequest, StreamingInputCallResponse]{ClientStream: stream}
   145  	return x, nil
   146  }
   147  
   148  // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
   149  type TestService_StreamingInputCallClient = grpc.ClientStreamingClient[StreamingInputCallRequest, StreamingInputCallResponse]
   150  
   151  func (c *testServiceClient) FullDuplexCall(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[StreamingOutputCallRequest, StreamingOutputCallResponse], error) {
   152  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   153  	stream, err := c.cc.NewStream(ctx, &TestService_ServiceDesc.Streams[2], TestService_FullDuplexCall_FullMethodName, cOpts...)
   154  	if err != nil {
   155  		return nil, err
   156  	}
   157  	x := &grpc.GenericClientStream[StreamingOutputCallRequest, StreamingOutputCallResponse]{ClientStream: stream}
   158  	return x, nil
   159  }
   160  
   161  // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
   162  type TestService_FullDuplexCallClient = grpc.BidiStreamingClient[StreamingOutputCallRequest, StreamingOutputCallResponse]
   163  
   164  func (c *testServiceClient) HalfDuplexCall(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[StreamingOutputCallRequest, StreamingOutputCallResponse], error) {
   165  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   166  	stream, err := c.cc.NewStream(ctx, &TestService_ServiceDesc.Streams[3], TestService_HalfDuplexCall_FullMethodName, cOpts...)
   167  	if err != nil {
   168  		return nil, err
   169  	}
   170  	x := &grpc.GenericClientStream[StreamingOutputCallRequest, StreamingOutputCallResponse]{ClientStream: stream}
   171  	return x, nil
   172  }
   173  
   174  // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
   175  type TestService_HalfDuplexCallClient = grpc.BidiStreamingClient[StreamingOutputCallRequest, StreamingOutputCallResponse]
   176  
   177  func (c *testServiceClient) UnimplementedCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
   178  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   179  	out := new(Empty)
   180  	err := c.cc.Invoke(ctx, TestService_UnimplementedCall_FullMethodName, in, out, cOpts...)
   181  	if err != nil {
   182  		return nil, err
   183  	}
   184  	return out, nil
   185  }
   186  
   187  // TestServiceServer is the server API for TestService service.
   188  // All implementations must embed UnimplementedTestServiceServer
   189  // for forward compatibility
   190  type TestServiceServer interface {
   191  	// One empty request followed by one empty response.
   192  	EmptyCall(context.Context, *Empty) (*Empty, error)
   193  	// One request followed by one response.
   194  	UnaryCall(context.Context, *SimpleRequest) (*SimpleResponse, error)
   195  	// One request followed by one response. Response has cache control
   196  	// headers set such that a caching HTTP proxy (such as GFE) can
   197  	// satisfy subsequent requests.
   198  	CacheableUnaryCall(context.Context, *SimpleRequest) (*SimpleResponse, error)
   199  	// One request followed by a sequence of responses (streamed download).
   200  	// The server returns the payload with client desired type and sizes.
   201  	StreamingOutputCall(*StreamingOutputCallRequest, grpc.ServerStreamingServer[StreamingOutputCallResponse]) error
   202  	// A sequence of requests followed by one response (streamed upload).
   203  	// The server returns the aggregated size of client payload as the result.
   204  	StreamingInputCall(grpc.ClientStreamingServer[StreamingInputCallRequest, StreamingInputCallResponse]) error
   205  	// A sequence of requests with each request served by the server immediately.
   206  	// As one request could lead to multiple responses, this interface
   207  	// demonstrates the idea of full duplexing.
   208  	FullDuplexCall(grpc.BidiStreamingServer[StreamingOutputCallRequest, StreamingOutputCallResponse]) error
   209  	// A sequence of requests followed by a sequence of responses.
   210  	// The server buffers all the client requests and then serves them in order. A
   211  	// stream of responses are returned to the client when the server starts with
   212  	// first request.
   213  	HalfDuplexCall(grpc.BidiStreamingServer[StreamingOutputCallRequest, StreamingOutputCallResponse]) error
   214  	// The test server will not implement this method. It will be used
   215  	// to test the behavior when clients call unimplemented methods.
   216  	UnimplementedCall(context.Context, *Empty) (*Empty, error)
   217  	mustEmbedUnimplementedTestServiceServer()
   218  }
   219  
   220  // UnimplementedTestServiceServer must be embedded to have forward compatible implementations.
   221  type UnimplementedTestServiceServer struct {
   222  }
   223  
   224  func (UnimplementedTestServiceServer) EmptyCall(context.Context, *Empty) (*Empty, error) {
   225  	return nil, status.Errorf(codes.Unimplemented, "method EmptyCall not implemented")
   226  }
   227  func (UnimplementedTestServiceServer) UnaryCall(context.Context, *SimpleRequest) (*SimpleResponse, error) {
   228  	return nil, status.Errorf(codes.Unimplemented, "method UnaryCall not implemented")
   229  }
   230  func (UnimplementedTestServiceServer) CacheableUnaryCall(context.Context, *SimpleRequest) (*SimpleResponse, error) {
   231  	return nil, status.Errorf(codes.Unimplemented, "method CacheableUnaryCall not implemented")
   232  }
   233  func (UnimplementedTestServiceServer) StreamingOutputCall(*StreamingOutputCallRequest, grpc.ServerStreamingServer[StreamingOutputCallResponse]) error {
   234  	return status.Errorf(codes.Unimplemented, "method StreamingOutputCall not implemented")
   235  }
   236  func (UnimplementedTestServiceServer) StreamingInputCall(grpc.ClientStreamingServer[StreamingInputCallRequest, StreamingInputCallResponse]) error {
   237  	return status.Errorf(codes.Unimplemented, "method StreamingInputCall not implemented")
   238  }
   239  func (UnimplementedTestServiceServer) FullDuplexCall(grpc.BidiStreamingServer[StreamingOutputCallRequest, StreamingOutputCallResponse]) error {
   240  	return status.Errorf(codes.Unimplemented, "method FullDuplexCall not implemented")
   241  }
   242  func (UnimplementedTestServiceServer) HalfDuplexCall(grpc.BidiStreamingServer[StreamingOutputCallRequest, StreamingOutputCallResponse]) error {
   243  	return status.Errorf(codes.Unimplemented, "method HalfDuplexCall not implemented")
   244  }
   245  func (UnimplementedTestServiceServer) UnimplementedCall(context.Context, *Empty) (*Empty, error) {
   246  	return nil, status.Errorf(codes.Unimplemented, "method UnimplementedCall not implemented")
   247  }
   248  func (UnimplementedTestServiceServer) mustEmbedUnimplementedTestServiceServer() {}
   249  
   250  // UnsafeTestServiceServer may be embedded to opt out of forward compatibility for this service.
   251  // Use of this interface is not recommended, as added methods to TestServiceServer will
   252  // result in compilation errors.
   253  type UnsafeTestServiceServer interface {
   254  	mustEmbedUnimplementedTestServiceServer()
   255  }
   256  
   257  func RegisterTestServiceServer(s grpc.ServiceRegistrar, srv TestServiceServer) {
   258  	s.RegisterService(&TestService_ServiceDesc, srv)
   259  }
   260  
   261  func _TestService_EmptyCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   262  	in := new(Empty)
   263  	if err := dec(in); err != nil {
   264  		return nil, err
   265  	}
   266  	if interceptor == nil {
   267  		return srv.(TestServiceServer).EmptyCall(ctx, in)
   268  	}
   269  	info := &grpc.UnaryServerInfo{
   270  		Server:     srv,
   271  		FullMethod: TestService_EmptyCall_FullMethodName,
   272  	}
   273  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   274  		return srv.(TestServiceServer).EmptyCall(ctx, req.(*Empty))
   275  	}
   276  	return interceptor(ctx, in, info, handler)
   277  }
   278  
   279  func _TestService_UnaryCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   280  	in := new(SimpleRequest)
   281  	if err := dec(in); err != nil {
   282  		return nil, err
   283  	}
   284  	if interceptor == nil {
   285  		return srv.(TestServiceServer).UnaryCall(ctx, in)
   286  	}
   287  	info := &grpc.UnaryServerInfo{
   288  		Server:     srv,
   289  		FullMethod: TestService_UnaryCall_FullMethodName,
   290  	}
   291  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   292  		return srv.(TestServiceServer).UnaryCall(ctx, req.(*SimpleRequest))
   293  	}
   294  	return interceptor(ctx, in, info, handler)
   295  }
   296  
   297  func _TestService_CacheableUnaryCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   298  	in := new(SimpleRequest)
   299  	if err := dec(in); err != nil {
   300  		return nil, err
   301  	}
   302  	if interceptor == nil {
   303  		return srv.(TestServiceServer).CacheableUnaryCall(ctx, in)
   304  	}
   305  	info := &grpc.UnaryServerInfo{
   306  		Server:     srv,
   307  		FullMethod: TestService_CacheableUnaryCall_FullMethodName,
   308  	}
   309  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   310  		return srv.(TestServiceServer).CacheableUnaryCall(ctx, req.(*SimpleRequest))
   311  	}
   312  	return interceptor(ctx, in, info, handler)
   313  }
   314  
   315  func _TestService_StreamingOutputCall_Handler(srv interface{}, stream grpc.ServerStream) error {
   316  	m := new(StreamingOutputCallRequest)
   317  	if err := stream.RecvMsg(m); err != nil {
   318  		return err
   319  	}
   320  	return srv.(TestServiceServer).StreamingOutputCall(m, &grpc.GenericServerStream[StreamingOutputCallRequest, StreamingOutputCallResponse]{ServerStream: stream})
   321  }
   322  
   323  // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
   324  type TestService_StreamingOutputCallServer = grpc.ServerStreamingServer[StreamingOutputCallResponse]
   325  
   326  func _TestService_StreamingInputCall_Handler(srv interface{}, stream grpc.ServerStream) error {
   327  	return srv.(TestServiceServer).StreamingInputCall(&grpc.GenericServerStream[StreamingInputCallRequest, StreamingInputCallResponse]{ServerStream: stream})
   328  }
   329  
   330  // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
   331  type TestService_StreamingInputCallServer = grpc.ClientStreamingServer[StreamingInputCallRequest, StreamingInputCallResponse]
   332  
   333  func _TestService_FullDuplexCall_Handler(srv interface{}, stream grpc.ServerStream) error {
   334  	return srv.(TestServiceServer).FullDuplexCall(&grpc.GenericServerStream[StreamingOutputCallRequest, StreamingOutputCallResponse]{ServerStream: stream})
   335  }
   336  
   337  // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
   338  type TestService_FullDuplexCallServer = grpc.BidiStreamingServer[StreamingOutputCallRequest, StreamingOutputCallResponse]
   339  
   340  func _TestService_HalfDuplexCall_Handler(srv interface{}, stream grpc.ServerStream) error {
   341  	return srv.(TestServiceServer).HalfDuplexCall(&grpc.GenericServerStream[StreamingOutputCallRequest, StreamingOutputCallResponse]{ServerStream: stream})
   342  }
   343  
   344  // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
   345  type TestService_HalfDuplexCallServer = grpc.BidiStreamingServer[StreamingOutputCallRequest, StreamingOutputCallResponse]
   346  
   347  func _TestService_UnimplementedCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   348  	in := new(Empty)
   349  	if err := dec(in); err != nil {
   350  		return nil, err
   351  	}
   352  	if interceptor == nil {
   353  		return srv.(TestServiceServer).UnimplementedCall(ctx, in)
   354  	}
   355  	info := &grpc.UnaryServerInfo{
   356  		Server:     srv,
   357  		FullMethod: TestService_UnimplementedCall_FullMethodName,
   358  	}
   359  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   360  		return srv.(TestServiceServer).UnimplementedCall(ctx, req.(*Empty))
   361  	}
   362  	return interceptor(ctx, in, info, handler)
   363  }
   364  
   365  // TestService_ServiceDesc is the grpc.ServiceDesc for TestService service.
   366  // It's only intended for direct use with grpc.RegisterService,
   367  // and not to be introspected or modified (even as a copy)
   368  var TestService_ServiceDesc = grpc.ServiceDesc{
   369  	ServiceName: "grpc.testing.TestService",
   370  	HandlerType: (*TestServiceServer)(nil),
   371  	Methods: []grpc.MethodDesc{
   372  		{
   373  			MethodName: "EmptyCall",
   374  			Handler:    _TestService_EmptyCall_Handler,
   375  		},
   376  		{
   377  			MethodName: "UnaryCall",
   378  			Handler:    _TestService_UnaryCall_Handler,
   379  		},
   380  		{
   381  			MethodName: "CacheableUnaryCall",
   382  			Handler:    _TestService_CacheableUnaryCall_Handler,
   383  		},
   384  		{
   385  			MethodName: "UnimplementedCall",
   386  			Handler:    _TestService_UnimplementedCall_Handler,
   387  		},
   388  	},
   389  	Streams: []grpc.StreamDesc{
   390  		{
   391  			StreamName:    "StreamingOutputCall",
   392  			Handler:       _TestService_StreamingOutputCall_Handler,
   393  			ServerStreams: true,
   394  		},
   395  		{
   396  			StreamName:    "StreamingInputCall",
   397  			Handler:       _TestService_StreamingInputCall_Handler,
   398  			ClientStreams: true,
   399  		},
   400  		{
   401  			StreamName:    "FullDuplexCall",
   402  			Handler:       _TestService_FullDuplexCall_Handler,
   403  			ServerStreams: true,
   404  			ClientStreams: true,
   405  		},
   406  		{
   407  			StreamName:    "HalfDuplexCall",
   408  			Handler:       _TestService_HalfDuplexCall_Handler,
   409  			ServerStreams: true,
   410  			ClientStreams: true,
   411  		},
   412  	},
   413  	Metadata: "grpc/testing/test.proto",
   414  }
   415  
   416  const (
   417  	UnimplementedService_UnimplementedCall_FullMethodName = "/grpc.testing.UnimplementedService/UnimplementedCall"
   418  )
   419  
   420  // UnimplementedServiceClient is the client API for UnimplementedService service.
   421  //
   422  // 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.
   423  type UnimplementedServiceClient interface {
   424  	// A call that no server should implement
   425  	UnimplementedCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
   426  }
   427  
   428  type unimplementedServiceClient struct {
   429  	cc grpc.ClientConnInterface
   430  }
   431  
   432  func NewUnimplementedServiceClient(cc grpc.ClientConnInterface) UnimplementedServiceClient {
   433  	return &unimplementedServiceClient{cc}
   434  }
   435  
   436  func (c *unimplementedServiceClient) UnimplementedCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
   437  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   438  	out := new(Empty)
   439  	err := c.cc.Invoke(ctx, UnimplementedService_UnimplementedCall_FullMethodName, in, out, cOpts...)
   440  	if err != nil {
   441  		return nil, err
   442  	}
   443  	return out, nil
   444  }
   445  
   446  // UnimplementedServiceServer is the server API for UnimplementedService service.
   447  // All implementations must embed UnimplementedUnimplementedServiceServer
   448  // for forward compatibility
   449  type UnimplementedServiceServer interface {
   450  	// A call that no server should implement
   451  	UnimplementedCall(context.Context, *Empty) (*Empty, error)
   452  	mustEmbedUnimplementedUnimplementedServiceServer()
   453  }
   454  
   455  // UnimplementedUnimplementedServiceServer must be embedded to have forward compatible implementations.
   456  type UnimplementedUnimplementedServiceServer struct {
   457  }
   458  
   459  func (UnimplementedUnimplementedServiceServer) UnimplementedCall(context.Context, *Empty) (*Empty, error) {
   460  	return nil, status.Errorf(codes.Unimplemented, "method UnimplementedCall not implemented")
   461  }
   462  func (UnimplementedUnimplementedServiceServer) mustEmbedUnimplementedUnimplementedServiceServer() {}
   463  
   464  // UnsafeUnimplementedServiceServer may be embedded to opt out of forward compatibility for this service.
   465  // Use of this interface is not recommended, as added methods to UnimplementedServiceServer will
   466  // result in compilation errors.
   467  type UnsafeUnimplementedServiceServer interface {
   468  	mustEmbedUnimplementedUnimplementedServiceServer()
   469  }
   470  
   471  func RegisterUnimplementedServiceServer(s grpc.ServiceRegistrar, srv UnimplementedServiceServer) {
   472  	s.RegisterService(&UnimplementedService_ServiceDesc, srv)
   473  }
   474  
   475  func _UnimplementedService_UnimplementedCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   476  	in := new(Empty)
   477  	if err := dec(in); err != nil {
   478  		return nil, err
   479  	}
   480  	if interceptor == nil {
   481  		return srv.(UnimplementedServiceServer).UnimplementedCall(ctx, in)
   482  	}
   483  	info := &grpc.UnaryServerInfo{
   484  		Server:     srv,
   485  		FullMethod: UnimplementedService_UnimplementedCall_FullMethodName,
   486  	}
   487  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   488  		return srv.(UnimplementedServiceServer).UnimplementedCall(ctx, req.(*Empty))
   489  	}
   490  	return interceptor(ctx, in, info, handler)
   491  }
   492  
   493  // UnimplementedService_ServiceDesc is the grpc.ServiceDesc for UnimplementedService service.
   494  // It's only intended for direct use with grpc.RegisterService,
   495  // and not to be introspected or modified (even as a copy)
   496  var UnimplementedService_ServiceDesc = grpc.ServiceDesc{
   497  	ServiceName: "grpc.testing.UnimplementedService",
   498  	HandlerType: (*UnimplementedServiceServer)(nil),
   499  	Methods: []grpc.MethodDesc{
   500  		{
   501  			MethodName: "UnimplementedCall",
   502  			Handler:    _UnimplementedService_UnimplementedCall_Handler,
   503  		},
   504  	},
   505  	Streams:  []grpc.StreamDesc{},
   506  	Metadata: "grpc/testing/test.proto",
   507  }
   508  
   509  const (
   510  	ReconnectService_Start_FullMethodName = "/grpc.testing.ReconnectService/Start"
   511  	ReconnectService_Stop_FullMethodName  = "/grpc.testing.ReconnectService/Stop"
   512  )
   513  
   514  // ReconnectServiceClient is the client API for ReconnectService service.
   515  //
   516  // 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.
   517  type ReconnectServiceClient interface {
   518  	Start(ctx context.Context, in *ReconnectParams, opts ...grpc.CallOption) (*Empty, error)
   519  	Stop(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ReconnectInfo, error)
   520  }
   521  
   522  type reconnectServiceClient struct {
   523  	cc grpc.ClientConnInterface
   524  }
   525  
   526  func NewReconnectServiceClient(cc grpc.ClientConnInterface) ReconnectServiceClient {
   527  	return &reconnectServiceClient{cc}
   528  }
   529  
   530  func (c *reconnectServiceClient) Start(ctx context.Context, in *ReconnectParams, opts ...grpc.CallOption) (*Empty, error) {
   531  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   532  	out := new(Empty)
   533  	err := c.cc.Invoke(ctx, ReconnectService_Start_FullMethodName, in, out, cOpts...)
   534  	if err != nil {
   535  		return nil, err
   536  	}
   537  	return out, nil
   538  }
   539  
   540  func (c *reconnectServiceClient) Stop(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ReconnectInfo, error) {
   541  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   542  	out := new(ReconnectInfo)
   543  	err := c.cc.Invoke(ctx, ReconnectService_Stop_FullMethodName, in, out, cOpts...)
   544  	if err != nil {
   545  		return nil, err
   546  	}
   547  	return out, nil
   548  }
   549  
   550  // ReconnectServiceServer is the server API for ReconnectService service.
   551  // All implementations must embed UnimplementedReconnectServiceServer
   552  // for forward compatibility
   553  type ReconnectServiceServer interface {
   554  	Start(context.Context, *ReconnectParams) (*Empty, error)
   555  	Stop(context.Context, *Empty) (*ReconnectInfo, error)
   556  	mustEmbedUnimplementedReconnectServiceServer()
   557  }
   558  
   559  // UnimplementedReconnectServiceServer must be embedded to have forward compatible implementations.
   560  type UnimplementedReconnectServiceServer struct {
   561  }
   562  
   563  func (UnimplementedReconnectServiceServer) Start(context.Context, *ReconnectParams) (*Empty, error) {
   564  	return nil, status.Errorf(codes.Unimplemented, "method Start not implemented")
   565  }
   566  func (UnimplementedReconnectServiceServer) Stop(context.Context, *Empty) (*ReconnectInfo, error) {
   567  	return nil, status.Errorf(codes.Unimplemented, "method Stop not implemented")
   568  }
   569  func (UnimplementedReconnectServiceServer) mustEmbedUnimplementedReconnectServiceServer() {}
   570  
   571  // UnsafeReconnectServiceServer may be embedded to opt out of forward compatibility for this service.
   572  // Use of this interface is not recommended, as added methods to ReconnectServiceServer will
   573  // result in compilation errors.
   574  type UnsafeReconnectServiceServer interface {
   575  	mustEmbedUnimplementedReconnectServiceServer()
   576  }
   577  
   578  func RegisterReconnectServiceServer(s grpc.ServiceRegistrar, srv ReconnectServiceServer) {
   579  	s.RegisterService(&ReconnectService_ServiceDesc, srv)
   580  }
   581  
   582  func _ReconnectService_Start_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   583  	in := new(ReconnectParams)
   584  	if err := dec(in); err != nil {
   585  		return nil, err
   586  	}
   587  	if interceptor == nil {
   588  		return srv.(ReconnectServiceServer).Start(ctx, in)
   589  	}
   590  	info := &grpc.UnaryServerInfo{
   591  		Server:     srv,
   592  		FullMethod: ReconnectService_Start_FullMethodName,
   593  	}
   594  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   595  		return srv.(ReconnectServiceServer).Start(ctx, req.(*ReconnectParams))
   596  	}
   597  	return interceptor(ctx, in, info, handler)
   598  }
   599  
   600  func _ReconnectService_Stop_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   601  	in := new(Empty)
   602  	if err := dec(in); err != nil {
   603  		return nil, err
   604  	}
   605  	if interceptor == nil {
   606  		return srv.(ReconnectServiceServer).Stop(ctx, in)
   607  	}
   608  	info := &grpc.UnaryServerInfo{
   609  		Server:     srv,
   610  		FullMethod: ReconnectService_Stop_FullMethodName,
   611  	}
   612  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   613  		return srv.(ReconnectServiceServer).Stop(ctx, req.(*Empty))
   614  	}
   615  	return interceptor(ctx, in, info, handler)
   616  }
   617  
   618  // ReconnectService_ServiceDesc is the grpc.ServiceDesc for ReconnectService service.
   619  // It's only intended for direct use with grpc.RegisterService,
   620  // and not to be introspected or modified (even as a copy)
   621  var ReconnectService_ServiceDesc = grpc.ServiceDesc{
   622  	ServiceName: "grpc.testing.ReconnectService",
   623  	HandlerType: (*ReconnectServiceServer)(nil),
   624  	Methods: []grpc.MethodDesc{
   625  		{
   626  			MethodName: "Start",
   627  			Handler:    _ReconnectService_Start_Handler,
   628  		},
   629  		{
   630  			MethodName: "Stop",
   631  			Handler:    _ReconnectService_Stop_Handler,
   632  		},
   633  	},
   634  	Streams:  []grpc.StreamDesc{},
   635  	Metadata: "grpc/testing/test.proto",
   636  }
   637  
   638  const (
   639  	LoadBalancerStatsService_GetClientStats_FullMethodName            = "/grpc.testing.LoadBalancerStatsService/GetClientStats"
   640  	LoadBalancerStatsService_GetClientAccumulatedStats_FullMethodName = "/grpc.testing.LoadBalancerStatsService/GetClientAccumulatedStats"
   641  )
   642  
   643  // LoadBalancerStatsServiceClient is the client API for LoadBalancerStatsService service.
   644  //
   645  // 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.
   646  type LoadBalancerStatsServiceClient interface {
   647  	// Gets the backend distribution for RPCs sent by a test client.
   648  	GetClientStats(ctx context.Context, in *LoadBalancerStatsRequest, opts ...grpc.CallOption) (*LoadBalancerStatsResponse, error)
   649  	// Gets the accumulated stats for RPCs sent by a test client.
   650  	GetClientAccumulatedStats(ctx context.Context, in *LoadBalancerAccumulatedStatsRequest, opts ...grpc.CallOption) (*LoadBalancerAccumulatedStatsResponse, error)
   651  }
   652  
   653  type loadBalancerStatsServiceClient struct {
   654  	cc grpc.ClientConnInterface
   655  }
   656  
   657  func NewLoadBalancerStatsServiceClient(cc grpc.ClientConnInterface) LoadBalancerStatsServiceClient {
   658  	return &loadBalancerStatsServiceClient{cc}
   659  }
   660  
   661  func (c *loadBalancerStatsServiceClient) GetClientStats(ctx context.Context, in *LoadBalancerStatsRequest, opts ...grpc.CallOption) (*LoadBalancerStatsResponse, error) {
   662  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   663  	out := new(LoadBalancerStatsResponse)
   664  	err := c.cc.Invoke(ctx, LoadBalancerStatsService_GetClientStats_FullMethodName, in, out, cOpts...)
   665  	if err != nil {
   666  		return nil, err
   667  	}
   668  	return out, nil
   669  }
   670  
   671  func (c *loadBalancerStatsServiceClient) GetClientAccumulatedStats(ctx context.Context, in *LoadBalancerAccumulatedStatsRequest, opts ...grpc.CallOption) (*LoadBalancerAccumulatedStatsResponse, error) {
   672  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   673  	out := new(LoadBalancerAccumulatedStatsResponse)
   674  	err := c.cc.Invoke(ctx, LoadBalancerStatsService_GetClientAccumulatedStats_FullMethodName, in, out, cOpts...)
   675  	if err != nil {
   676  		return nil, err
   677  	}
   678  	return out, nil
   679  }
   680  
   681  // LoadBalancerStatsServiceServer is the server API for LoadBalancerStatsService service.
   682  // All implementations must embed UnimplementedLoadBalancerStatsServiceServer
   683  // for forward compatibility
   684  type LoadBalancerStatsServiceServer interface {
   685  	// Gets the backend distribution for RPCs sent by a test client.
   686  	GetClientStats(context.Context, *LoadBalancerStatsRequest) (*LoadBalancerStatsResponse, error)
   687  	// Gets the accumulated stats for RPCs sent by a test client.
   688  	GetClientAccumulatedStats(context.Context, *LoadBalancerAccumulatedStatsRequest) (*LoadBalancerAccumulatedStatsResponse, error)
   689  	mustEmbedUnimplementedLoadBalancerStatsServiceServer()
   690  }
   691  
   692  // UnimplementedLoadBalancerStatsServiceServer must be embedded to have forward compatible implementations.
   693  type UnimplementedLoadBalancerStatsServiceServer struct {
   694  }
   695  
   696  func (UnimplementedLoadBalancerStatsServiceServer) GetClientStats(context.Context, *LoadBalancerStatsRequest) (*LoadBalancerStatsResponse, error) {
   697  	return nil, status.Errorf(codes.Unimplemented, "method GetClientStats not implemented")
   698  }
   699  func (UnimplementedLoadBalancerStatsServiceServer) GetClientAccumulatedStats(context.Context, *LoadBalancerAccumulatedStatsRequest) (*LoadBalancerAccumulatedStatsResponse, error) {
   700  	return nil, status.Errorf(codes.Unimplemented, "method GetClientAccumulatedStats not implemented")
   701  }
   702  func (UnimplementedLoadBalancerStatsServiceServer) mustEmbedUnimplementedLoadBalancerStatsServiceServer() {
   703  }
   704  
   705  // UnsafeLoadBalancerStatsServiceServer may be embedded to opt out of forward compatibility for this service.
   706  // Use of this interface is not recommended, as added methods to LoadBalancerStatsServiceServer will
   707  // result in compilation errors.
   708  type UnsafeLoadBalancerStatsServiceServer interface {
   709  	mustEmbedUnimplementedLoadBalancerStatsServiceServer()
   710  }
   711  
   712  func RegisterLoadBalancerStatsServiceServer(s grpc.ServiceRegistrar, srv LoadBalancerStatsServiceServer) {
   713  	s.RegisterService(&LoadBalancerStatsService_ServiceDesc, srv)
   714  }
   715  
   716  func _LoadBalancerStatsService_GetClientStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   717  	in := new(LoadBalancerStatsRequest)
   718  	if err := dec(in); err != nil {
   719  		return nil, err
   720  	}
   721  	if interceptor == nil {
   722  		return srv.(LoadBalancerStatsServiceServer).GetClientStats(ctx, in)
   723  	}
   724  	info := &grpc.UnaryServerInfo{
   725  		Server:     srv,
   726  		FullMethod: LoadBalancerStatsService_GetClientStats_FullMethodName,
   727  	}
   728  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   729  		return srv.(LoadBalancerStatsServiceServer).GetClientStats(ctx, req.(*LoadBalancerStatsRequest))
   730  	}
   731  	return interceptor(ctx, in, info, handler)
   732  }
   733  
   734  func _LoadBalancerStatsService_GetClientAccumulatedStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   735  	in := new(LoadBalancerAccumulatedStatsRequest)
   736  	if err := dec(in); err != nil {
   737  		return nil, err
   738  	}
   739  	if interceptor == nil {
   740  		return srv.(LoadBalancerStatsServiceServer).GetClientAccumulatedStats(ctx, in)
   741  	}
   742  	info := &grpc.UnaryServerInfo{
   743  		Server:     srv,
   744  		FullMethod: LoadBalancerStatsService_GetClientAccumulatedStats_FullMethodName,
   745  	}
   746  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   747  		return srv.(LoadBalancerStatsServiceServer).GetClientAccumulatedStats(ctx, req.(*LoadBalancerAccumulatedStatsRequest))
   748  	}
   749  	return interceptor(ctx, in, info, handler)
   750  }
   751  
   752  // LoadBalancerStatsService_ServiceDesc is the grpc.ServiceDesc for LoadBalancerStatsService service.
   753  // It's only intended for direct use with grpc.RegisterService,
   754  // and not to be introspected or modified (even as a copy)
   755  var LoadBalancerStatsService_ServiceDesc = grpc.ServiceDesc{
   756  	ServiceName: "grpc.testing.LoadBalancerStatsService",
   757  	HandlerType: (*LoadBalancerStatsServiceServer)(nil),
   758  	Methods: []grpc.MethodDesc{
   759  		{
   760  			MethodName: "GetClientStats",
   761  			Handler:    _LoadBalancerStatsService_GetClientStats_Handler,
   762  		},
   763  		{
   764  			MethodName: "GetClientAccumulatedStats",
   765  			Handler:    _LoadBalancerStatsService_GetClientAccumulatedStats_Handler,
   766  		},
   767  	},
   768  	Streams:  []grpc.StreamDesc{},
   769  	Metadata: "grpc/testing/test.proto",
   770  }
   771  
   772  const (
   773  	HookService_Hook_FullMethodName              = "/grpc.testing.HookService/Hook"
   774  	HookService_SetReturnStatus_FullMethodName   = "/grpc.testing.HookService/SetReturnStatus"
   775  	HookService_ClearReturnStatus_FullMethodName = "/grpc.testing.HookService/ClearReturnStatus"
   776  )
   777  
   778  // HookServiceClient is the client API for HookService service.
   779  //
   780  // 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.
   781  type HookServiceClient interface {
   782  	// Sends a request that will "hang" until the return status is set by a call
   783  	// to a SetReturnStatus
   784  	Hook(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
   785  	// Sets a return status for pending and upcoming calls to Hook
   786  	SetReturnStatus(ctx context.Context, in *SetReturnStatusRequest, opts ...grpc.CallOption) (*Empty, error)
   787  	// Clears the return status. Incoming calls to Hook will "hang"
   788  	ClearReturnStatus(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
   789  }
   790  
   791  type hookServiceClient struct {
   792  	cc grpc.ClientConnInterface
   793  }
   794  
   795  func NewHookServiceClient(cc grpc.ClientConnInterface) HookServiceClient {
   796  	return &hookServiceClient{cc}
   797  }
   798  
   799  func (c *hookServiceClient) Hook(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
   800  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   801  	out := new(Empty)
   802  	err := c.cc.Invoke(ctx, HookService_Hook_FullMethodName, in, out, cOpts...)
   803  	if err != nil {
   804  		return nil, err
   805  	}
   806  	return out, nil
   807  }
   808  
   809  func (c *hookServiceClient) SetReturnStatus(ctx context.Context, in *SetReturnStatusRequest, opts ...grpc.CallOption) (*Empty, error) {
   810  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   811  	out := new(Empty)
   812  	err := c.cc.Invoke(ctx, HookService_SetReturnStatus_FullMethodName, in, out, cOpts...)
   813  	if err != nil {
   814  		return nil, err
   815  	}
   816  	return out, nil
   817  }
   818  
   819  func (c *hookServiceClient) ClearReturnStatus(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
   820  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   821  	out := new(Empty)
   822  	err := c.cc.Invoke(ctx, HookService_ClearReturnStatus_FullMethodName, in, out, cOpts...)
   823  	if err != nil {
   824  		return nil, err
   825  	}
   826  	return out, nil
   827  }
   828  
   829  // HookServiceServer is the server API for HookService service.
   830  // All implementations must embed UnimplementedHookServiceServer
   831  // for forward compatibility
   832  type HookServiceServer interface {
   833  	// Sends a request that will "hang" until the return status is set by a call
   834  	// to a SetReturnStatus
   835  	Hook(context.Context, *Empty) (*Empty, error)
   836  	// Sets a return status for pending and upcoming calls to Hook
   837  	SetReturnStatus(context.Context, *SetReturnStatusRequest) (*Empty, error)
   838  	// Clears the return status. Incoming calls to Hook will "hang"
   839  	ClearReturnStatus(context.Context, *Empty) (*Empty, error)
   840  	mustEmbedUnimplementedHookServiceServer()
   841  }
   842  
   843  // UnimplementedHookServiceServer must be embedded to have forward compatible implementations.
   844  type UnimplementedHookServiceServer struct {
   845  }
   846  
   847  func (UnimplementedHookServiceServer) Hook(context.Context, *Empty) (*Empty, error) {
   848  	return nil, status.Errorf(codes.Unimplemented, "method Hook not implemented")
   849  }
   850  func (UnimplementedHookServiceServer) SetReturnStatus(context.Context, *SetReturnStatusRequest) (*Empty, error) {
   851  	return nil, status.Errorf(codes.Unimplemented, "method SetReturnStatus not implemented")
   852  }
   853  func (UnimplementedHookServiceServer) ClearReturnStatus(context.Context, *Empty) (*Empty, error) {
   854  	return nil, status.Errorf(codes.Unimplemented, "method ClearReturnStatus not implemented")
   855  }
   856  func (UnimplementedHookServiceServer) mustEmbedUnimplementedHookServiceServer() {}
   857  
   858  // UnsafeHookServiceServer may be embedded to opt out of forward compatibility for this service.
   859  // Use of this interface is not recommended, as added methods to HookServiceServer will
   860  // result in compilation errors.
   861  type UnsafeHookServiceServer interface {
   862  	mustEmbedUnimplementedHookServiceServer()
   863  }
   864  
   865  func RegisterHookServiceServer(s grpc.ServiceRegistrar, srv HookServiceServer) {
   866  	s.RegisterService(&HookService_ServiceDesc, srv)
   867  }
   868  
   869  func _HookService_Hook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   870  	in := new(Empty)
   871  	if err := dec(in); err != nil {
   872  		return nil, err
   873  	}
   874  	if interceptor == nil {
   875  		return srv.(HookServiceServer).Hook(ctx, in)
   876  	}
   877  	info := &grpc.UnaryServerInfo{
   878  		Server:     srv,
   879  		FullMethod: HookService_Hook_FullMethodName,
   880  	}
   881  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   882  		return srv.(HookServiceServer).Hook(ctx, req.(*Empty))
   883  	}
   884  	return interceptor(ctx, in, info, handler)
   885  }
   886  
   887  func _HookService_SetReturnStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   888  	in := new(SetReturnStatusRequest)
   889  	if err := dec(in); err != nil {
   890  		return nil, err
   891  	}
   892  	if interceptor == nil {
   893  		return srv.(HookServiceServer).SetReturnStatus(ctx, in)
   894  	}
   895  	info := &grpc.UnaryServerInfo{
   896  		Server:     srv,
   897  		FullMethod: HookService_SetReturnStatus_FullMethodName,
   898  	}
   899  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   900  		return srv.(HookServiceServer).SetReturnStatus(ctx, req.(*SetReturnStatusRequest))
   901  	}
   902  	return interceptor(ctx, in, info, handler)
   903  }
   904  
   905  func _HookService_ClearReturnStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   906  	in := new(Empty)
   907  	if err := dec(in); err != nil {
   908  		return nil, err
   909  	}
   910  	if interceptor == nil {
   911  		return srv.(HookServiceServer).ClearReturnStatus(ctx, in)
   912  	}
   913  	info := &grpc.UnaryServerInfo{
   914  		Server:     srv,
   915  		FullMethod: HookService_ClearReturnStatus_FullMethodName,
   916  	}
   917  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   918  		return srv.(HookServiceServer).ClearReturnStatus(ctx, req.(*Empty))
   919  	}
   920  	return interceptor(ctx, in, info, handler)
   921  }
   922  
   923  // HookService_ServiceDesc is the grpc.ServiceDesc for HookService service.
   924  // It's only intended for direct use with grpc.RegisterService,
   925  // and not to be introspected or modified (even as a copy)
   926  var HookService_ServiceDesc = grpc.ServiceDesc{
   927  	ServiceName: "grpc.testing.HookService",
   928  	HandlerType: (*HookServiceServer)(nil),
   929  	Methods: []grpc.MethodDesc{
   930  		{
   931  			MethodName: "Hook",
   932  			Handler:    _HookService_Hook_Handler,
   933  		},
   934  		{
   935  			MethodName: "SetReturnStatus",
   936  			Handler:    _HookService_SetReturnStatus_Handler,
   937  		},
   938  		{
   939  			MethodName: "ClearReturnStatus",
   940  			Handler:    _HookService_ClearReturnStatus_Handler,
   941  		},
   942  	},
   943  	Streams:  []grpc.StreamDesc{},
   944  	Metadata: "grpc/testing/test.proto",
   945  }
   946  
   947  const (
   948  	XdsUpdateHealthService_SetServing_FullMethodName      = "/grpc.testing.XdsUpdateHealthService/SetServing"
   949  	XdsUpdateHealthService_SetNotServing_FullMethodName   = "/grpc.testing.XdsUpdateHealthService/SetNotServing"
   950  	XdsUpdateHealthService_SendHookRequest_FullMethodName = "/grpc.testing.XdsUpdateHealthService/SendHookRequest"
   951  )
   952  
   953  // XdsUpdateHealthServiceClient is the client API for XdsUpdateHealthService service.
   954  //
   955  // 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.
   956  type XdsUpdateHealthServiceClient interface {
   957  	SetServing(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
   958  	SetNotServing(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
   959  	SendHookRequest(ctx context.Context, in *HookRequest, opts ...grpc.CallOption) (*HookResponse, error)
   960  }
   961  
   962  type xdsUpdateHealthServiceClient struct {
   963  	cc grpc.ClientConnInterface
   964  }
   965  
   966  func NewXdsUpdateHealthServiceClient(cc grpc.ClientConnInterface) XdsUpdateHealthServiceClient {
   967  	return &xdsUpdateHealthServiceClient{cc}
   968  }
   969  
   970  func (c *xdsUpdateHealthServiceClient) SetServing(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
   971  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   972  	out := new(Empty)
   973  	err := c.cc.Invoke(ctx, XdsUpdateHealthService_SetServing_FullMethodName, in, out, cOpts...)
   974  	if err != nil {
   975  		return nil, err
   976  	}
   977  	return out, nil
   978  }
   979  
   980  func (c *xdsUpdateHealthServiceClient) SetNotServing(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
   981  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   982  	out := new(Empty)
   983  	err := c.cc.Invoke(ctx, XdsUpdateHealthService_SetNotServing_FullMethodName, in, out, cOpts...)
   984  	if err != nil {
   985  		return nil, err
   986  	}
   987  	return out, nil
   988  }
   989  
   990  func (c *xdsUpdateHealthServiceClient) SendHookRequest(ctx context.Context, in *HookRequest, opts ...grpc.CallOption) (*HookResponse, error) {
   991  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
   992  	out := new(HookResponse)
   993  	err := c.cc.Invoke(ctx, XdsUpdateHealthService_SendHookRequest_FullMethodName, in, out, cOpts...)
   994  	if err != nil {
   995  		return nil, err
   996  	}
   997  	return out, nil
   998  }
   999  
  1000  // XdsUpdateHealthServiceServer is the server API for XdsUpdateHealthService service.
  1001  // All implementations must embed UnimplementedXdsUpdateHealthServiceServer
  1002  // for forward compatibility
  1003  type XdsUpdateHealthServiceServer interface {
  1004  	SetServing(context.Context, *Empty) (*Empty, error)
  1005  	SetNotServing(context.Context, *Empty) (*Empty, error)
  1006  	SendHookRequest(context.Context, *HookRequest) (*HookResponse, error)
  1007  	mustEmbedUnimplementedXdsUpdateHealthServiceServer()
  1008  }
  1009  
  1010  // UnimplementedXdsUpdateHealthServiceServer must be embedded to have forward compatible implementations.
  1011  type UnimplementedXdsUpdateHealthServiceServer struct {
  1012  }
  1013  
  1014  func (UnimplementedXdsUpdateHealthServiceServer) SetServing(context.Context, *Empty) (*Empty, error) {
  1015  	return nil, status.Errorf(codes.Unimplemented, "method SetServing not implemented")
  1016  }
  1017  func (UnimplementedXdsUpdateHealthServiceServer) SetNotServing(context.Context, *Empty) (*Empty, error) {
  1018  	return nil, status.Errorf(codes.Unimplemented, "method SetNotServing not implemented")
  1019  }
  1020  func (UnimplementedXdsUpdateHealthServiceServer) SendHookRequest(context.Context, *HookRequest) (*HookResponse, error) {
  1021  	return nil, status.Errorf(codes.Unimplemented, "method SendHookRequest not implemented")
  1022  }
  1023  func (UnimplementedXdsUpdateHealthServiceServer) mustEmbedUnimplementedXdsUpdateHealthServiceServer() {
  1024  }
  1025  
  1026  // UnsafeXdsUpdateHealthServiceServer may be embedded to opt out of forward compatibility for this service.
  1027  // Use of this interface is not recommended, as added methods to XdsUpdateHealthServiceServer will
  1028  // result in compilation errors.
  1029  type UnsafeXdsUpdateHealthServiceServer interface {
  1030  	mustEmbedUnimplementedXdsUpdateHealthServiceServer()
  1031  }
  1032  
  1033  func RegisterXdsUpdateHealthServiceServer(s grpc.ServiceRegistrar, srv XdsUpdateHealthServiceServer) {
  1034  	s.RegisterService(&XdsUpdateHealthService_ServiceDesc, srv)
  1035  }
  1036  
  1037  func _XdsUpdateHealthService_SetServing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1038  	in := new(Empty)
  1039  	if err := dec(in); err != nil {
  1040  		return nil, err
  1041  	}
  1042  	if interceptor == nil {
  1043  		return srv.(XdsUpdateHealthServiceServer).SetServing(ctx, in)
  1044  	}
  1045  	info := &grpc.UnaryServerInfo{
  1046  		Server:     srv,
  1047  		FullMethod: XdsUpdateHealthService_SetServing_FullMethodName,
  1048  	}
  1049  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1050  		return srv.(XdsUpdateHealthServiceServer).SetServing(ctx, req.(*Empty))
  1051  	}
  1052  	return interceptor(ctx, in, info, handler)
  1053  }
  1054  
  1055  func _XdsUpdateHealthService_SetNotServing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1056  	in := new(Empty)
  1057  	if err := dec(in); err != nil {
  1058  		return nil, err
  1059  	}
  1060  	if interceptor == nil {
  1061  		return srv.(XdsUpdateHealthServiceServer).SetNotServing(ctx, in)
  1062  	}
  1063  	info := &grpc.UnaryServerInfo{
  1064  		Server:     srv,
  1065  		FullMethod: XdsUpdateHealthService_SetNotServing_FullMethodName,
  1066  	}
  1067  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1068  		return srv.(XdsUpdateHealthServiceServer).SetNotServing(ctx, req.(*Empty))
  1069  	}
  1070  	return interceptor(ctx, in, info, handler)
  1071  }
  1072  
  1073  func _XdsUpdateHealthService_SendHookRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1074  	in := new(HookRequest)
  1075  	if err := dec(in); err != nil {
  1076  		return nil, err
  1077  	}
  1078  	if interceptor == nil {
  1079  		return srv.(XdsUpdateHealthServiceServer).SendHookRequest(ctx, in)
  1080  	}
  1081  	info := &grpc.UnaryServerInfo{
  1082  		Server:     srv,
  1083  		FullMethod: XdsUpdateHealthService_SendHookRequest_FullMethodName,
  1084  	}
  1085  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1086  		return srv.(XdsUpdateHealthServiceServer).SendHookRequest(ctx, req.(*HookRequest))
  1087  	}
  1088  	return interceptor(ctx, in, info, handler)
  1089  }
  1090  
  1091  // XdsUpdateHealthService_ServiceDesc is the grpc.ServiceDesc for XdsUpdateHealthService service.
  1092  // It's only intended for direct use with grpc.RegisterService,
  1093  // and not to be introspected or modified (even as a copy)
  1094  var XdsUpdateHealthService_ServiceDesc = grpc.ServiceDesc{
  1095  	ServiceName: "grpc.testing.XdsUpdateHealthService",
  1096  	HandlerType: (*XdsUpdateHealthServiceServer)(nil),
  1097  	Methods: []grpc.MethodDesc{
  1098  		{
  1099  			MethodName: "SetServing",
  1100  			Handler:    _XdsUpdateHealthService_SetServing_Handler,
  1101  		},
  1102  		{
  1103  			MethodName: "SetNotServing",
  1104  			Handler:    _XdsUpdateHealthService_SetNotServing_Handler,
  1105  		},
  1106  		{
  1107  			MethodName: "SendHookRequest",
  1108  			Handler:    _XdsUpdateHealthService_SendHookRequest_Handler,
  1109  		},
  1110  	},
  1111  	Streams:  []grpc.StreamDesc{},
  1112  	Metadata: "grpc/testing/test.proto",
  1113  }
  1114  
  1115  const (
  1116  	XdsUpdateClientConfigureService_Configure_FullMethodName = "/grpc.testing.XdsUpdateClientConfigureService/Configure"
  1117  )
  1118  
  1119  // XdsUpdateClientConfigureServiceClient is the client API for XdsUpdateClientConfigureService service.
  1120  //
  1121  // 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.
  1122  type XdsUpdateClientConfigureServiceClient interface {
  1123  	// Update the tes client's configuration.
  1124  	Configure(ctx context.Context, in *ClientConfigureRequest, opts ...grpc.CallOption) (*ClientConfigureResponse, error)
  1125  }
  1126  
  1127  type xdsUpdateClientConfigureServiceClient struct {
  1128  	cc grpc.ClientConnInterface
  1129  }
  1130  
  1131  func NewXdsUpdateClientConfigureServiceClient(cc grpc.ClientConnInterface) XdsUpdateClientConfigureServiceClient {
  1132  	return &xdsUpdateClientConfigureServiceClient{cc}
  1133  }
  1134  
  1135  func (c *xdsUpdateClientConfigureServiceClient) Configure(ctx context.Context, in *ClientConfigureRequest, opts ...grpc.CallOption) (*ClientConfigureResponse, error) {
  1136  	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  1137  	out := new(ClientConfigureResponse)
  1138  	err := c.cc.Invoke(ctx, XdsUpdateClientConfigureService_Configure_FullMethodName, in, out, cOpts...)
  1139  	if err != nil {
  1140  		return nil, err
  1141  	}
  1142  	return out, nil
  1143  }
  1144  
  1145  // XdsUpdateClientConfigureServiceServer is the server API for XdsUpdateClientConfigureService service.
  1146  // All implementations must embed UnimplementedXdsUpdateClientConfigureServiceServer
  1147  // for forward compatibility
  1148  type XdsUpdateClientConfigureServiceServer interface {
  1149  	// Update the tes client's configuration.
  1150  	Configure(context.Context, *ClientConfigureRequest) (*ClientConfigureResponse, error)
  1151  	mustEmbedUnimplementedXdsUpdateClientConfigureServiceServer()
  1152  }
  1153  
  1154  // UnimplementedXdsUpdateClientConfigureServiceServer must be embedded to have forward compatible implementations.
  1155  type UnimplementedXdsUpdateClientConfigureServiceServer struct {
  1156  }
  1157  
  1158  func (UnimplementedXdsUpdateClientConfigureServiceServer) Configure(context.Context, *ClientConfigureRequest) (*ClientConfigureResponse, error) {
  1159  	return nil, status.Errorf(codes.Unimplemented, "method Configure not implemented")
  1160  }
  1161  func (UnimplementedXdsUpdateClientConfigureServiceServer) mustEmbedUnimplementedXdsUpdateClientConfigureServiceServer() {
  1162  }
  1163  
  1164  // UnsafeXdsUpdateClientConfigureServiceServer may be embedded to opt out of forward compatibility for this service.
  1165  // Use of this interface is not recommended, as added methods to XdsUpdateClientConfigureServiceServer will
  1166  // result in compilation errors.
  1167  type UnsafeXdsUpdateClientConfigureServiceServer interface {
  1168  	mustEmbedUnimplementedXdsUpdateClientConfigureServiceServer()
  1169  }
  1170  
  1171  func RegisterXdsUpdateClientConfigureServiceServer(s grpc.ServiceRegistrar, srv XdsUpdateClientConfigureServiceServer) {
  1172  	s.RegisterService(&XdsUpdateClientConfigureService_ServiceDesc, srv)
  1173  }
  1174  
  1175  func _XdsUpdateClientConfigureService_Configure_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1176  	in := new(ClientConfigureRequest)
  1177  	if err := dec(in); err != nil {
  1178  		return nil, err
  1179  	}
  1180  	if interceptor == nil {
  1181  		return srv.(XdsUpdateClientConfigureServiceServer).Configure(ctx, in)
  1182  	}
  1183  	info := &grpc.UnaryServerInfo{
  1184  		Server:     srv,
  1185  		FullMethod: XdsUpdateClientConfigureService_Configure_FullMethodName,
  1186  	}
  1187  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1188  		return srv.(XdsUpdateClientConfigureServiceServer).Configure(ctx, req.(*ClientConfigureRequest))
  1189  	}
  1190  	return interceptor(ctx, in, info, handler)
  1191  }
  1192  
  1193  // XdsUpdateClientConfigureService_ServiceDesc is the grpc.ServiceDesc for XdsUpdateClientConfigureService service.
  1194  // It's only intended for direct use with grpc.RegisterService,
  1195  // and not to be introspected or modified (even as a copy)
  1196  var XdsUpdateClientConfigureService_ServiceDesc = grpc.ServiceDesc{
  1197  	ServiceName: "grpc.testing.XdsUpdateClientConfigureService",
  1198  	HandlerType: (*XdsUpdateClientConfigureServiceServer)(nil),
  1199  	Methods: []grpc.MethodDesc{
  1200  		{
  1201  			MethodName: "Configure",
  1202  			Handler:    _XdsUpdateClientConfigureService_Configure_Handler,
  1203  		},
  1204  	},
  1205  	Streams:  []grpc.StreamDesc{},
  1206  	Metadata: "grpc/testing/test.proto",
  1207  }
  1208  

View as plain text