// Copyright 2015-2016 gRPC authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // An integration test service that covers all the method signature permutations // of unary/streaming requests/responses. // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc v4.22.0 // source: grpc/testing/test.proto package grpc_testing import ( context "context" 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 ( TestService_EmptyCall_FullMethodName = "/grpc.testing.TestService/EmptyCall" TestService_UnaryCall_FullMethodName = "/grpc.testing.TestService/UnaryCall" TestService_CacheableUnaryCall_FullMethodName = "/grpc.testing.TestService/CacheableUnaryCall" TestService_StreamingOutputCall_FullMethodName = "/grpc.testing.TestService/StreamingOutputCall" TestService_StreamingInputCall_FullMethodName = "/grpc.testing.TestService/StreamingInputCall" TestService_FullDuplexCall_FullMethodName = "/grpc.testing.TestService/FullDuplexCall" TestService_HalfDuplexCall_FullMethodName = "/grpc.testing.TestService/HalfDuplexCall" TestService_UnimplementedCall_FullMethodName = "/grpc.testing.TestService/UnimplementedCall" ) // TestServiceClient is the client API for TestService 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 TestServiceClient interface { // One empty request followed by one empty response. EmptyCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) // One request followed by one response. UnaryCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error) // One request followed by one response. Response has cache control // headers set such that a caching HTTP proxy (such as GFE) can // satisfy subsequent requests. CacheableUnaryCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error) // One request followed by a sequence of responses (streamed download). // The server returns the payload with client desired type and sizes. StreamingOutputCall(ctx context.Context, in *StreamingOutputCallRequest, opts ...grpc.CallOption) (TestService_StreamingOutputCallClient, error) // A sequence of requests followed by one response (streamed upload). // The server returns the aggregated size of client payload as the result. StreamingInputCall(ctx context.Context, opts ...grpc.CallOption) (TestService_StreamingInputCallClient, error) // A sequence of requests with each request served by the server immediately. // As one request could lead to multiple responses, this interface // demonstrates the idea of full duplexing. FullDuplexCall(ctx context.Context, opts ...grpc.CallOption) (TestService_FullDuplexCallClient, error) // A sequence of requests followed by a sequence of responses. // The server buffers all the client requests and then serves them in order. A // stream of responses are returned to the client when the server starts with // first request. HalfDuplexCall(ctx context.Context, opts ...grpc.CallOption) (TestService_HalfDuplexCallClient, error) // The test server will not implement this method. It will be used // to test the behavior when clients call unimplemented methods. UnimplementedCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) } type testServiceClient struct { cc grpc.ClientConnInterface } func NewTestServiceClient(cc grpc.ClientConnInterface) TestServiceClient { return &testServiceClient{cc} } func (c *testServiceClient) EmptyCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) { out := new(Empty) err := c.cc.Invoke(ctx, TestService_EmptyCall_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *testServiceClient) UnaryCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error) { out := new(SimpleResponse) err := c.cc.Invoke(ctx, TestService_UnaryCall_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *testServiceClient) CacheableUnaryCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error) { out := new(SimpleResponse) err := c.cc.Invoke(ctx, TestService_CacheableUnaryCall_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *testServiceClient) StreamingOutputCall(ctx context.Context, in *StreamingOutputCallRequest, opts ...grpc.CallOption) (TestService_StreamingOutputCallClient, error) { stream, err := c.cc.NewStream(ctx, &TestService_ServiceDesc.Streams[0], TestService_StreamingOutputCall_FullMethodName, opts...) if err != nil { return nil, err } x := &testServiceStreamingOutputCallClient{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 TestService_StreamingOutputCallClient interface { Recv() (*StreamingOutputCallResponse, error) grpc.ClientStream } type testServiceStreamingOutputCallClient struct { grpc.ClientStream } func (x *testServiceStreamingOutputCallClient) Recv() (*StreamingOutputCallResponse, error) { m := new(StreamingOutputCallResponse) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func (c *testServiceClient) StreamingInputCall(ctx context.Context, opts ...grpc.CallOption) (TestService_StreamingInputCallClient, error) { stream, err := c.cc.NewStream(ctx, &TestService_ServiceDesc.Streams[1], TestService_StreamingInputCall_FullMethodName, opts...) if err != nil { return nil, err } x := &testServiceStreamingInputCallClient{stream} return x, nil } type TestService_StreamingInputCallClient interface { Send(*StreamingInputCallRequest) error CloseAndRecv() (*StreamingInputCallResponse, error) grpc.ClientStream } type testServiceStreamingInputCallClient struct { grpc.ClientStream } func (x *testServiceStreamingInputCallClient) Send(m *StreamingInputCallRequest) error { return x.ClientStream.SendMsg(m) } func (x *testServiceStreamingInputCallClient) CloseAndRecv() (*StreamingInputCallResponse, error) { if err := x.ClientStream.CloseSend(); err != nil { return nil, err } m := new(StreamingInputCallResponse) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func (c *testServiceClient) FullDuplexCall(ctx context.Context, opts ...grpc.CallOption) (TestService_FullDuplexCallClient, error) { stream, err := c.cc.NewStream(ctx, &TestService_ServiceDesc.Streams[2], TestService_FullDuplexCall_FullMethodName, opts...) if err != nil { return nil, err } x := &testServiceFullDuplexCallClient{stream} return x, nil } type TestService_FullDuplexCallClient interface { Send(*StreamingOutputCallRequest) error Recv() (*StreamingOutputCallResponse, error) grpc.ClientStream } type testServiceFullDuplexCallClient struct { grpc.ClientStream } func (x *testServiceFullDuplexCallClient) Send(m *StreamingOutputCallRequest) error { return x.ClientStream.SendMsg(m) } func (x *testServiceFullDuplexCallClient) Recv() (*StreamingOutputCallResponse, error) { m := new(StreamingOutputCallResponse) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func (c *testServiceClient) HalfDuplexCall(ctx context.Context, opts ...grpc.CallOption) (TestService_HalfDuplexCallClient, error) { stream, err := c.cc.NewStream(ctx, &TestService_ServiceDesc.Streams[3], TestService_HalfDuplexCall_FullMethodName, opts...) if err != nil { return nil, err } x := &testServiceHalfDuplexCallClient{stream} return x, nil } type TestService_HalfDuplexCallClient interface { Send(*StreamingOutputCallRequest) error Recv() (*StreamingOutputCallResponse, error) grpc.ClientStream } type testServiceHalfDuplexCallClient struct { grpc.ClientStream } func (x *testServiceHalfDuplexCallClient) Send(m *StreamingOutputCallRequest) error { return x.ClientStream.SendMsg(m) } func (x *testServiceHalfDuplexCallClient) Recv() (*StreamingOutputCallResponse, error) { m := new(StreamingOutputCallResponse) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func (c *testServiceClient) UnimplementedCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) { out := new(Empty) err := c.cc.Invoke(ctx, TestService_UnimplementedCall_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // TestServiceServer is the server API for TestService service. // All implementations must embed UnimplementedTestServiceServer // for forward compatibility type TestServiceServer interface { // One empty request followed by one empty response. EmptyCall(context.Context, *Empty) (*Empty, error) // One request followed by one response. UnaryCall(context.Context, *SimpleRequest) (*SimpleResponse, error) // One request followed by one response. Response has cache control // headers set such that a caching HTTP proxy (such as GFE) can // satisfy subsequent requests. CacheableUnaryCall(context.Context, *SimpleRequest) (*SimpleResponse, error) // One request followed by a sequence of responses (streamed download). // The server returns the payload with client desired type and sizes. StreamingOutputCall(*StreamingOutputCallRequest, TestService_StreamingOutputCallServer) error // A sequence of requests followed by one response (streamed upload). // The server returns the aggregated size of client payload as the result. StreamingInputCall(TestService_StreamingInputCallServer) error // A sequence of requests with each request served by the server immediately. // As one request could lead to multiple responses, this interface // demonstrates the idea of full duplexing. FullDuplexCall(TestService_FullDuplexCallServer) error // A sequence of requests followed by a sequence of responses. // The server buffers all the client requests and then serves them in order. A // stream of responses are returned to the client when the server starts with // first request. HalfDuplexCall(TestService_HalfDuplexCallServer) error // The test server will not implement this method. It will be used // to test the behavior when clients call unimplemented methods. UnimplementedCall(context.Context, *Empty) (*Empty, error) mustEmbedUnimplementedTestServiceServer() } // UnimplementedTestServiceServer must be embedded to have forward compatible implementations. type UnimplementedTestServiceServer struct { } func (UnimplementedTestServiceServer) EmptyCall(context.Context, *Empty) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method EmptyCall not implemented") } func (UnimplementedTestServiceServer) UnaryCall(context.Context, *SimpleRequest) (*SimpleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UnaryCall not implemented") } func (UnimplementedTestServiceServer) CacheableUnaryCall(context.Context, *SimpleRequest) (*SimpleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CacheableUnaryCall not implemented") } func (UnimplementedTestServiceServer) StreamingOutputCall(*StreamingOutputCallRequest, TestService_StreamingOutputCallServer) error { return status.Errorf(codes.Unimplemented, "method StreamingOutputCall not implemented") } func (UnimplementedTestServiceServer) StreamingInputCall(TestService_StreamingInputCallServer) error { return status.Errorf(codes.Unimplemented, "method StreamingInputCall not implemented") } func (UnimplementedTestServiceServer) FullDuplexCall(TestService_FullDuplexCallServer) error { return status.Errorf(codes.Unimplemented, "method FullDuplexCall not implemented") } func (UnimplementedTestServiceServer) HalfDuplexCall(TestService_HalfDuplexCallServer) error { return status.Errorf(codes.Unimplemented, "method HalfDuplexCall not implemented") } func (UnimplementedTestServiceServer) UnimplementedCall(context.Context, *Empty) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method UnimplementedCall not implemented") } func (UnimplementedTestServiceServer) mustEmbedUnimplementedTestServiceServer() {} // UnsafeTestServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to TestServiceServer will // result in compilation errors. type UnsafeTestServiceServer interface { mustEmbedUnimplementedTestServiceServer() } func RegisterTestServiceServer(s grpc.ServiceRegistrar, srv TestServiceServer) { s.RegisterService(&TestService_ServiceDesc, srv) } func _TestService_EmptyCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(TestServiceServer).EmptyCall(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: TestService_EmptyCall_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TestServiceServer).EmptyCall(ctx, req.(*Empty)) } return interceptor(ctx, in, info, handler) } func _TestService_UnaryCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SimpleRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(TestServiceServer).UnaryCall(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: TestService_UnaryCall_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TestServiceServer).UnaryCall(ctx, req.(*SimpleRequest)) } return interceptor(ctx, in, info, handler) } func _TestService_CacheableUnaryCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SimpleRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(TestServiceServer).CacheableUnaryCall(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: TestService_CacheableUnaryCall_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TestServiceServer).CacheableUnaryCall(ctx, req.(*SimpleRequest)) } return interceptor(ctx, in, info, handler) } func _TestService_StreamingOutputCall_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(StreamingOutputCallRequest) if err := stream.RecvMsg(m); err != nil { return err } return srv.(TestServiceServer).StreamingOutputCall(m, &testServiceStreamingOutputCallServer{stream}) } type TestService_StreamingOutputCallServer interface { Send(*StreamingOutputCallResponse) error grpc.ServerStream } type testServiceStreamingOutputCallServer struct { grpc.ServerStream } func (x *testServiceStreamingOutputCallServer) Send(m *StreamingOutputCallResponse) error { return x.ServerStream.SendMsg(m) } func _TestService_StreamingInputCall_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(TestServiceServer).StreamingInputCall(&testServiceStreamingInputCallServer{stream}) } type TestService_StreamingInputCallServer interface { SendAndClose(*StreamingInputCallResponse) error Recv() (*StreamingInputCallRequest, error) grpc.ServerStream } type testServiceStreamingInputCallServer struct { grpc.ServerStream } func (x *testServiceStreamingInputCallServer) SendAndClose(m *StreamingInputCallResponse) error { return x.ServerStream.SendMsg(m) } func (x *testServiceStreamingInputCallServer) Recv() (*StreamingInputCallRequest, error) { m := new(StreamingInputCallRequest) if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func _TestService_FullDuplexCall_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(TestServiceServer).FullDuplexCall(&testServiceFullDuplexCallServer{stream}) } type TestService_FullDuplexCallServer interface { Send(*StreamingOutputCallResponse) error Recv() (*StreamingOutputCallRequest, error) grpc.ServerStream } type testServiceFullDuplexCallServer struct { grpc.ServerStream } func (x *testServiceFullDuplexCallServer) Send(m *StreamingOutputCallResponse) error { return x.ServerStream.SendMsg(m) } func (x *testServiceFullDuplexCallServer) Recv() (*StreamingOutputCallRequest, error) { m := new(StreamingOutputCallRequest) if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func _TestService_HalfDuplexCall_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(TestServiceServer).HalfDuplexCall(&testServiceHalfDuplexCallServer{stream}) } type TestService_HalfDuplexCallServer interface { Send(*StreamingOutputCallResponse) error Recv() (*StreamingOutputCallRequest, error) grpc.ServerStream } type testServiceHalfDuplexCallServer struct { grpc.ServerStream } func (x *testServiceHalfDuplexCallServer) Send(m *StreamingOutputCallResponse) error { return x.ServerStream.SendMsg(m) } func (x *testServiceHalfDuplexCallServer) Recv() (*StreamingOutputCallRequest, error) { m := new(StreamingOutputCallRequest) if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func _TestService_UnimplementedCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(TestServiceServer).UnimplementedCall(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: TestService_UnimplementedCall_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TestServiceServer).UnimplementedCall(ctx, req.(*Empty)) } return interceptor(ctx, in, info, handler) } // TestService_ServiceDesc is the grpc.ServiceDesc for TestService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var TestService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "grpc.testing.TestService", HandlerType: (*TestServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "EmptyCall", Handler: _TestService_EmptyCall_Handler, }, { MethodName: "UnaryCall", Handler: _TestService_UnaryCall_Handler, }, { MethodName: "CacheableUnaryCall", Handler: _TestService_CacheableUnaryCall_Handler, }, { MethodName: "UnimplementedCall", Handler: _TestService_UnimplementedCall_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "StreamingOutputCall", Handler: _TestService_StreamingOutputCall_Handler, ServerStreams: true, }, { StreamName: "StreamingInputCall", Handler: _TestService_StreamingInputCall_Handler, ClientStreams: true, }, { StreamName: "FullDuplexCall", Handler: _TestService_FullDuplexCall_Handler, ServerStreams: true, ClientStreams: true, }, { StreamName: "HalfDuplexCall", Handler: _TestService_HalfDuplexCall_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "grpc/testing/test.proto", } const ( UnimplementedService_UnimplementedCall_FullMethodName = "/grpc.testing.UnimplementedService/UnimplementedCall" ) // UnimplementedServiceClient is the client API for UnimplementedService 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 UnimplementedServiceClient interface { // A call that no server should implement UnimplementedCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) } type unimplementedServiceClient struct { cc grpc.ClientConnInterface } func NewUnimplementedServiceClient(cc grpc.ClientConnInterface) UnimplementedServiceClient { return &unimplementedServiceClient{cc} } func (c *unimplementedServiceClient) UnimplementedCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) { out := new(Empty) err := c.cc.Invoke(ctx, UnimplementedService_UnimplementedCall_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // UnimplementedServiceServer is the server API for UnimplementedService service. // All implementations must embed UnimplementedUnimplementedServiceServer // for forward compatibility type UnimplementedServiceServer interface { // A call that no server should implement UnimplementedCall(context.Context, *Empty) (*Empty, error) mustEmbedUnimplementedUnimplementedServiceServer() } // UnimplementedUnimplementedServiceServer must be embedded to have forward compatible implementations. type UnimplementedUnimplementedServiceServer struct { } func (UnimplementedUnimplementedServiceServer) UnimplementedCall(context.Context, *Empty) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method UnimplementedCall not implemented") } func (UnimplementedUnimplementedServiceServer) mustEmbedUnimplementedUnimplementedServiceServer() {} // UnsafeUnimplementedServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to UnimplementedServiceServer will // result in compilation errors. type UnsafeUnimplementedServiceServer interface { mustEmbedUnimplementedUnimplementedServiceServer() } func RegisterUnimplementedServiceServer(s grpc.ServiceRegistrar, srv UnimplementedServiceServer) { s.RegisterService(&UnimplementedService_ServiceDesc, srv) } func _UnimplementedService_UnimplementedCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(UnimplementedServiceServer).UnimplementedCall(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: UnimplementedService_UnimplementedCall_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(UnimplementedServiceServer).UnimplementedCall(ctx, req.(*Empty)) } return interceptor(ctx, in, info, handler) } // UnimplementedService_ServiceDesc is the grpc.ServiceDesc for UnimplementedService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var UnimplementedService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "grpc.testing.UnimplementedService", HandlerType: (*UnimplementedServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "UnimplementedCall", Handler: _UnimplementedService_UnimplementedCall_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "grpc/testing/test.proto", } const ( ReconnectService_Start_FullMethodName = "/grpc.testing.ReconnectService/Start" ReconnectService_Stop_FullMethodName = "/grpc.testing.ReconnectService/Stop" ) // ReconnectServiceClient is the client API for ReconnectService 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 ReconnectServiceClient interface { Start(ctx context.Context, in *ReconnectParams, opts ...grpc.CallOption) (*Empty, error) Stop(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ReconnectInfo, error) } type reconnectServiceClient struct { cc grpc.ClientConnInterface } func NewReconnectServiceClient(cc grpc.ClientConnInterface) ReconnectServiceClient { return &reconnectServiceClient{cc} } func (c *reconnectServiceClient) Start(ctx context.Context, in *ReconnectParams, opts ...grpc.CallOption) (*Empty, error) { out := new(Empty) err := c.cc.Invoke(ctx, ReconnectService_Start_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *reconnectServiceClient) Stop(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ReconnectInfo, error) { out := new(ReconnectInfo) err := c.cc.Invoke(ctx, ReconnectService_Stop_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // ReconnectServiceServer is the server API for ReconnectService service. // All implementations must embed UnimplementedReconnectServiceServer // for forward compatibility type ReconnectServiceServer interface { Start(context.Context, *ReconnectParams) (*Empty, error) Stop(context.Context, *Empty) (*ReconnectInfo, error) mustEmbedUnimplementedReconnectServiceServer() } // UnimplementedReconnectServiceServer must be embedded to have forward compatible implementations. type UnimplementedReconnectServiceServer struct { } func (UnimplementedReconnectServiceServer) Start(context.Context, *ReconnectParams) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Start not implemented") } func (UnimplementedReconnectServiceServer) Stop(context.Context, *Empty) (*ReconnectInfo, error) { return nil, status.Errorf(codes.Unimplemented, "method Stop not implemented") } func (UnimplementedReconnectServiceServer) mustEmbedUnimplementedReconnectServiceServer() {} // UnsafeReconnectServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ReconnectServiceServer will // result in compilation errors. type UnsafeReconnectServiceServer interface { mustEmbedUnimplementedReconnectServiceServer() } func RegisterReconnectServiceServer(s grpc.ServiceRegistrar, srv ReconnectServiceServer) { s.RegisterService(&ReconnectService_ServiceDesc, srv) } func _ReconnectService_Start_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ReconnectParams) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ReconnectServiceServer).Start(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ReconnectService_Start_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ReconnectServiceServer).Start(ctx, req.(*ReconnectParams)) } return interceptor(ctx, in, info, handler) } func _ReconnectService_Stop_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ReconnectServiceServer).Stop(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ReconnectService_Stop_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ReconnectServiceServer).Stop(ctx, req.(*Empty)) } return interceptor(ctx, in, info, handler) } // ReconnectService_ServiceDesc is the grpc.ServiceDesc for ReconnectService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var ReconnectService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "grpc.testing.ReconnectService", HandlerType: (*ReconnectServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Start", Handler: _ReconnectService_Start_Handler, }, { MethodName: "Stop", Handler: _ReconnectService_Stop_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "grpc/testing/test.proto", } const ( LoadBalancerStatsService_GetClientStats_FullMethodName = "/grpc.testing.LoadBalancerStatsService/GetClientStats" LoadBalancerStatsService_GetClientAccumulatedStats_FullMethodName = "/grpc.testing.LoadBalancerStatsService/GetClientAccumulatedStats" ) // LoadBalancerStatsServiceClient is the client API for LoadBalancerStatsService 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 LoadBalancerStatsServiceClient interface { // Gets the backend distribution for RPCs sent by a test client. GetClientStats(ctx context.Context, in *LoadBalancerStatsRequest, opts ...grpc.CallOption) (*LoadBalancerStatsResponse, error) // Gets the accumulated stats for RPCs sent by a test client. GetClientAccumulatedStats(ctx context.Context, in *LoadBalancerAccumulatedStatsRequest, opts ...grpc.CallOption) (*LoadBalancerAccumulatedStatsResponse, error) } type loadBalancerStatsServiceClient struct { cc grpc.ClientConnInterface } func NewLoadBalancerStatsServiceClient(cc grpc.ClientConnInterface) LoadBalancerStatsServiceClient { return &loadBalancerStatsServiceClient{cc} } func (c *loadBalancerStatsServiceClient) GetClientStats(ctx context.Context, in *LoadBalancerStatsRequest, opts ...grpc.CallOption) (*LoadBalancerStatsResponse, error) { out := new(LoadBalancerStatsResponse) err := c.cc.Invoke(ctx, LoadBalancerStatsService_GetClientStats_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *loadBalancerStatsServiceClient) GetClientAccumulatedStats(ctx context.Context, in *LoadBalancerAccumulatedStatsRequest, opts ...grpc.CallOption) (*LoadBalancerAccumulatedStatsResponse, error) { out := new(LoadBalancerAccumulatedStatsResponse) err := c.cc.Invoke(ctx, LoadBalancerStatsService_GetClientAccumulatedStats_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // LoadBalancerStatsServiceServer is the server API for LoadBalancerStatsService service. // All implementations must embed UnimplementedLoadBalancerStatsServiceServer // for forward compatibility type LoadBalancerStatsServiceServer interface { // Gets the backend distribution for RPCs sent by a test client. GetClientStats(context.Context, *LoadBalancerStatsRequest) (*LoadBalancerStatsResponse, error) // Gets the accumulated stats for RPCs sent by a test client. GetClientAccumulatedStats(context.Context, *LoadBalancerAccumulatedStatsRequest) (*LoadBalancerAccumulatedStatsResponse, error) mustEmbedUnimplementedLoadBalancerStatsServiceServer() } // UnimplementedLoadBalancerStatsServiceServer must be embedded to have forward compatible implementations. type UnimplementedLoadBalancerStatsServiceServer struct { } func (UnimplementedLoadBalancerStatsServiceServer) GetClientStats(context.Context, *LoadBalancerStatsRequest) (*LoadBalancerStatsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetClientStats not implemented") } func (UnimplementedLoadBalancerStatsServiceServer) GetClientAccumulatedStats(context.Context, *LoadBalancerAccumulatedStatsRequest) (*LoadBalancerAccumulatedStatsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetClientAccumulatedStats not implemented") } func (UnimplementedLoadBalancerStatsServiceServer) mustEmbedUnimplementedLoadBalancerStatsServiceServer() { } // UnsafeLoadBalancerStatsServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to LoadBalancerStatsServiceServer will // result in compilation errors. type UnsafeLoadBalancerStatsServiceServer interface { mustEmbedUnimplementedLoadBalancerStatsServiceServer() } func RegisterLoadBalancerStatsServiceServer(s grpc.ServiceRegistrar, srv LoadBalancerStatsServiceServer) { s.RegisterService(&LoadBalancerStatsService_ServiceDesc, srv) } func _LoadBalancerStatsService_GetClientStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(LoadBalancerStatsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(LoadBalancerStatsServiceServer).GetClientStats(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: LoadBalancerStatsService_GetClientStats_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(LoadBalancerStatsServiceServer).GetClientStats(ctx, req.(*LoadBalancerStatsRequest)) } return interceptor(ctx, in, info, handler) } func _LoadBalancerStatsService_GetClientAccumulatedStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(LoadBalancerAccumulatedStatsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(LoadBalancerStatsServiceServer).GetClientAccumulatedStats(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: LoadBalancerStatsService_GetClientAccumulatedStats_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(LoadBalancerStatsServiceServer).GetClientAccumulatedStats(ctx, req.(*LoadBalancerAccumulatedStatsRequest)) } return interceptor(ctx, in, info, handler) } // LoadBalancerStatsService_ServiceDesc is the grpc.ServiceDesc for LoadBalancerStatsService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var LoadBalancerStatsService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "grpc.testing.LoadBalancerStatsService", HandlerType: (*LoadBalancerStatsServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetClientStats", Handler: _LoadBalancerStatsService_GetClientStats_Handler, }, { MethodName: "GetClientAccumulatedStats", Handler: _LoadBalancerStatsService_GetClientAccumulatedStats_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "grpc/testing/test.proto", } const ( XdsUpdateHealthService_SetServing_FullMethodName = "/grpc.testing.XdsUpdateHealthService/SetServing" XdsUpdateHealthService_SetNotServing_FullMethodName = "/grpc.testing.XdsUpdateHealthService/SetNotServing" ) // XdsUpdateHealthServiceClient is the client API for XdsUpdateHealthService 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 XdsUpdateHealthServiceClient interface { SetServing(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) SetNotServing(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) } type xdsUpdateHealthServiceClient struct { cc grpc.ClientConnInterface } func NewXdsUpdateHealthServiceClient(cc grpc.ClientConnInterface) XdsUpdateHealthServiceClient { return &xdsUpdateHealthServiceClient{cc} } func (c *xdsUpdateHealthServiceClient) SetServing(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) { out := new(Empty) err := c.cc.Invoke(ctx, XdsUpdateHealthService_SetServing_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *xdsUpdateHealthServiceClient) SetNotServing(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) { out := new(Empty) err := c.cc.Invoke(ctx, XdsUpdateHealthService_SetNotServing_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // XdsUpdateHealthServiceServer is the server API for XdsUpdateHealthService service. // All implementations must embed UnimplementedXdsUpdateHealthServiceServer // for forward compatibility type XdsUpdateHealthServiceServer interface { SetServing(context.Context, *Empty) (*Empty, error) SetNotServing(context.Context, *Empty) (*Empty, error) mustEmbedUnimplementedXdsUpdateHealthServiceServer() } // UnimplementedXdsUpdateHealthServiceServer must be embedded to have forward compatible implementations. type UnimplementedXdsUpdateHealthServiceServer struct { } func (UnimplementedXdsUpdateHealthServiceServer) SetServing(context.Context, *Empty) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method SetServing not implemented") } func (UnimplementedXdsUpdateHealthServiceServer) SetNotServing(context.Context, *Empty) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method SetNotServing not implemented") } func (UnimplementedXdsUpdateHealthServiceServer) mustEmbedUnimplementedXdsUpdateHealthServiceServer() { } // UnsafeXdsUpdateHealthServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to XdsUpdateHealthServiceServer will // result in compilation errors. type UnsafeXdsUpdateHealthServiceServer interface { mustEmbedUnimplementedXdsUpdateHealthServiceServer() } func RegisterXdsUpdateHealthServiceServer(s grpc.ServiceRegistrar, srv XdsUpdateHealthServiceServer) { s.RegisterService(&XdsUpdateHealthService_ServiceDesc, srv) } func _XdsUpdateHealthService_SetServing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(XdsUpdateHealthServiceServer).SetServing(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: XdsUpdateHealthService_SetServing_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(XdsUpdateHealthServiceServer).SetServing(ctx, req.(*Empty)) } return interceptor(ctx, in, info, handler) } func _XdsUpdateHealthService_SetNotServing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(XdsUpdateHealthServiceServer).SetNotServing(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: XdsUpdateHealthService_SetNotServing_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(XdsUpdateHealthServiceServer).SetNotServing(ctx, req.(*Empty)) } return interceptor(ctx, in, info, handler) } // XdsUpdateHealthService_ServiceDesc is the grpc.ServiceDesc for XdsUpdateHealthService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var XdsUpdateHealthService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "grpc.testing.XdsUpdateHealthService", HandlerType: (*XdsUpdateHealthServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SetServing", Handler: _XdsUpdateHealthService_SetServing_Handler, }, { MethodName: "SetNotServing", Handler: _XdsUpdateHealthService_SetNotServing_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "grpc/testing/test.proto", } const ( XdsUpdateClientConfigureService_Configure_FullMethodName = "/grpc.testing.XdsUpdateClientConfigureService/Configure" ) // XdsUpdateClientConfigureServiceClient is the client API for XdsUpdateClientConfigureService 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 XdsUpdateClientConfigureServiceClient interface { // Update the tes client's configuration. Configure(ctx context.Context, in *ClientConfigureRequest, opts ...grpc.CallOption) (*ClientConfigureResponse, error) } type xdsUpdateClientConfigureServiceClient struct { cc grpc.ClientConnInterface } func NewXdsUpdateClientConfigureServiceClient(cc grpc.ClientConnInterface) XdsUpdateClientConfigureServiceClient { return &xdsUpdateClientConfigureServiceClient{cc} } func (c *xdsUpdateClientConfigureServiceClient) Configure(ctx context.Context, in *ClientConfigureRequest, opts ...grpc.CallOption) (*ClientConfigureResponse, error) { out := new(ClientConfigureResponse) err := c.cc.Invoke(ctx, XdsUpdateClientConfigureService_Configure_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // XdsUpdateClientConfigureServiceServer is the server API for XdsUpdateClientConfigureService service. // All implementations must embed UnimplementedXdsUpdateClientConfigureServiceServer // for forward compatibility type XdsUpdateClientConfigureServiceServer interface { // Update the tes client's configuration. Configure(context.Context, *ClientConfigureRequest) (*ClientConfigureResponse, error) mustEmbedUnimplementedXdsUpdateClientConfigureServiceServer() } // UnimplementedXdsUpdateClientConfigureServiceServer must be embedded to have forward compatible implementations. type UnimplementedXdsUpdateClientConfigureServiceServer struct { } func (UnimplementedXdsUpdateClientConfigureServiceServer) Configure(context.Context, *ClientConfigureRequest) (*ClientConfigureResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Configure not implemented") } func (UnimplementedXdsUpdateClientConfigureServiceServer) mustEmbedUnimplementedXdsUpdateClientConfigureServiceServer() { } // UnsafeXdsUpdateClientConfigureServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to XdsUpdateClientConfigureServiceServer will // result in compilation errors. type UnsafeXdsUpdateClientConfigureServiceServer interface { mustEmbedUnimplementedXdsUpdateClientConfigureServiceServer() } func RegisterXdsUpdateClientConfigureServiceServer(s grpc.ServiceRegistrar, srv XdsUpdateClientConfigureServiceServer) { s.RegisterService(&XdsUpdateClientConfigureService_ServiceDesc, srv) } func _XdsUpdateClientConfigureService_Configure_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ClientConfigureRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(XdsUpdateClientConfigureServiceServer).Configure(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: XdsUpdateClientConfigureService_Configure_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(XdsUpdateClientConfigureServiceServer).Configure(ctx, req.(*ClientConfigureRequest)) } return interceptor(ctx, in, info, handler) } // XdsUpdateClientConfigureService_ServiceDesc is the grpc.ServiceDesc for XdsUpdateClientConfigureService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var XdsUpdateClientConfigureService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "grpc.testing.XdsUpdateClientConfigureService", HandlerType: (*XdsUpdateClientConfigureServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Configure", Handler: _XdsUpdateClientConfigureService_Configure_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "grpc/testing/test.proto", }