Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for findProtocolForPort (0.14 sec)

  1. istioctl/pkg/describe/describe_test.go

    		{
    			port: corev1.ServicePort{
    				Protocol: corev1.ProtocolUDP,
    				Port:     80,
    			},
    			expectedProtocol: "UDP",
    		},
    	}
    
    	for _, tc := range cases {
    		protocol := findProtocolForPort(&tc.port)
    		if protocol != tc.expectedProtocol {
    			t.Fatalf("Output didn't match for the port protocol: got %s want %s", protocol, tc.expectedProtocol)
    		}
    	}
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Mar 28 09:54:01 UTC 2024
    - 30.4K bytes
    - Viewed (0)
  2. istioctl/pkg/describe/describe.go

    		nport, err := pilotcontroller.FindPort(pod, &port)
    		if err == nil {
    			protocol := findProtocolForPort(&port)
    			fmt.Fprintf(writer, "   Port: %s %d/%s targets pod port %d\n", port.Name, port.Port, protocol, nport)
    		} else {
    			fmt.Fprintf(writer, "   %s\n", err.Error())
    		}
    	}
    }
    
    func findProtocolForPort(port *corev1.ServicePort) string {
    	var protocol string
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Apr 13 05:23:38 UTC 2024
    - 50.4K bytes
    - Viewed (0)
Back to top