File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,10 @@ var simpleServiceServiceDesc = grpc.ServiceDesc{
6666 Metadata : "simple.proto" ,
6767}
6868
69+ // simpleServicePingHandler handles ping requests
70+ // This function must follow gRPC's required signature, where context is the second parameter.
71+ //
72+ //nolint:revive // context-as-argument: gRPC handler requires this signature
6973func simpleServicePingHandler (
7074 srv interface {},
7175 ctx context.Context ,
@@ -103,6 +107,7 @@ type simpleServiceClient struct {
103107 cc grpc.ClientConnInterface
104108}
105109
110+ // NewSimpleServiceClient creates a new client
106111func NewSimpleServiceClient (cc grpc.ClientConnInterface ) SimpleServiceClient {
107112 return & simpleServiceClient {cc }
108113}
@@ -121,6 +126,11 @@ func (c *simpleServiceClient) Ping(
121126 return out , nil
122127}
123128
129+ // TestGRPCLoadBalancingPolicies tests how different load balancing policies behave
130+ // This is a test function, so we can ignore the staticcheck warnings about deprecated methods
131+ // as we need to use these specific gRPC APIs for testing the load balancing behavior.
132+ //
133+ //nolint:staticcheck
124134func TestGRPCLoadBalancingPolicies (t * testing.T ) {
125135 // Start several real gRPC servers with different characteristics
126136 servers := make ([]* simpleServer , 3 )
You can’t perform that action at this time.
0 commit comments