Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. 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: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Thu Oct 24 17:36:49 UTC 2024
    - 50.6K bytes
    - Viewed (0)
  2. istioctl/pkg/describe/describe_test.go

    				Port:        15008,
    				Name:        "mesh",
    				AppProtocol: &hbone,
    			},
    			expectedProtocol: "HBONE",
    		},
    	}
    
    	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: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Thu Aug 01 20:04:20 UTC 2024
    - 30.8K bytes
    - Viewed (0)
Back to top