func protocolsForObject(object runtime.Object) (map[string]string, error) { … } func getProtocols(spec corev1.PodSpec) map[string]string { … } // Extracts the protocols exposed by a service from the given service spec. func getServiceProtocols(spec corev1.ServiceSpec) map[string]string { … }