Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 190 for returns (0.14 sec)

  1. operator/cmd/mesh/manifest_shared_test.go

    		}
    	}
    	return out
    }
    
    // readFile reads a file and returns the contents.
    func readFile(path string) (string, error) {
    	b, err := os.ReadFile(path)
    	return string(b), err
    }
    
    // writeFile writes a file and returns an error if operation is unsuccessful.
    func writeFile(path string, data []byte) error {
    	return os.WriteFile(path, data, 0o644)
    }
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue Feb 20 22:39:28 GMT 2024
    - 11.7K bytes
    - Viewed (1)
  2. istioctl/pkg/multixds/gather.go

    				if err != nil {
    					return nil, err
    				}
    				response, err := xds.GetXdsResponse(dr, istioNamespace, tokenServiceAccount, centralOpts, dialOpts)
    				if err != nil {
    					return nil, err
    				}
    				return map[string]*discovery.DiscoveryResponse{
    					CpInfo(response).ID: response,
    				}, nil
    			}
    		}
    		return nil, err
    	}
    	return mapShards(responses)
    }
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri Mar 08 08:38:19 GMT 2024
    - 13.6K bytes
    - Viewed (0)
  3. operator/cmd/mesh/operator-common.go

    		ImagePullSecrets:  ocArgs.imagePullSecrets,
    		Revision:          ocArgs.revision,
    	}
    	vals, err := util.RenderTemplate(tmpl, tv)
    	if err != nil {
    		return "", "", err
    	}
    	manifest, err := r.RenderManifest(vals)
    	return vals, manifest, err
    }
    
    // deploymentExists returns true if the given deployment in the namespace exists.
    func deploymentExists(cs kubernetes.Interface, namespace, name string) (bool, error) {
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Sat Dec 17 02:25:04 GMT 2022
    - 3.8K bytes
    - Viewed (0)
  4. istioctl/pkg/writer/ztunnel/configdump/workload.go

    		return svc.Name
    	}
    
    	return "NA" // Shouldn't normally reach here
    }
    
    func serviceWaypointName(svc *ZtunnelService, services map[string]*ZtunnelService) string {
    	if svc.Waypoint == nil {
    		return "None"
    	}
    
    	if svc, ok := services[svc.Waypoint.Destination]; ok {
    		return svc.Name
    	}
    
    	return "NA" // Shouldn't normally reach here
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue Apr 23 21:30:30 GMT 2024
    - 4K bytes
    - Viewed (0)
  5. istioctl/pkg/writer/envoy/clusters/clusters.go

    		if ec[i].address == ec[j].address {
    			if ec[i].port == ec[j].port {
    				return ec[i].cluster < ec[j].cluster
    			}
    			return ec[i].port < ec[j].port
    		}
    		return ec[i].address < ec[j].address
    	})
    	return ec
    }
    
    func printFailedOutlierCheck(b bool) string {
    	if b {
    		return "FAILED"
    	}
    	return "OK"
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Thu Nov 03 08:41:32 GMT 2022
    - 5.8K bytes
    - Viewed (0)
  6. cni/pkg/repair/netns.go

    )
    
    func getPidNamespace(pid int) string {
    	return "/host/proc/" + strconv.Itoa(pid) + "/ns/net"
    }
    
    func runInHost[T any](f func() (T, error)) (T, error) {
    	var res T
    	ns, err := netns.GetNS(getPidNamespace(1))
    	if err != nil {
    		return res, fmt.Errorf("failed to get host network: %v", err)
    	}
    	err = ns.Do(func(ns netns.NetNS) error {
    		var err error
    		res, err = f()
    		return err
    	})
    	if err != nil {
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Wed Dec 20 22:14:13 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  7. cni/pkg/plugin/sidecar_redirect.go

    			port, err := parsePort(portStr)
    			if err != nil {
    				return nil, err
    			}
    			ports = append(ports, int(port))
    		}
    	}
    	return ports, nil
    }
    
    func validatePortList(ports string) error {
    	if _, err := parsePorts(ports); err != nil {
    		return fmt.Errorf("portList %q invalid: %v", ports, err)
    	}
    	return nil
    }
    
    func validatePortListWithWildcard(ports string) error {
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri Jan 26 20:34:28 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  8. manifests/manifest.go

    	"os"
    )
    
    // FS embeds the manifests
    //
    //go:embed all:charts/* profiles/*
    var FS embed.FS
    
    // BuiltinOrDir returns a FS for the provided directory. If no directory is passed, the compiled in
    // FS will be used
    func BuiltinOrDir(dir string) fs.FS {
    	if dir == "" {
    		return FS
    	}
    	return os.DirFS(dir)
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Wed Mar 15 02:30:16 GMT 2023
    - 935 bytes
    - Viewed (0)
  9. istioctl/pkg/util/ambient/util.go

    	isZtunnel := strings.HasPrefix(podName, "ztunnel")
    	if client == nil {
    		return isZtunnel
    	}
    	pod, err := client.Kube().CoreV1().Pods(podNamespace).Get(context.Background(), podName, metav1.GetOptions{})
    	if err != nil {
    		return isZtunnel
    	}
    	if v, ok := pod.Labels["app"]; ok {
    		return v == "ztunnel"
    	}
    	return isZtunnel
    }
    
    // InAmbient returns true if a resource is in ambient data plane mode.
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Thu May 02 21:29:40 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  10. istioctl/pkg/writer/ztunnel/configdump/policies.go

    			return r
    		}
    		return cmp.Compare(a.Name, b.Name)
    	})
    	out, err := json.MarshalIndent(policies, "", "    ")
    	if err != nil {
    		return fmt.Errorf("failed to marshal policies: %v", err)
    	}
    	if outputFormat == "yaml" {
    		if out, err = yaml.JSONToYAML(out); err != nil {
    			return err
    		}
    	}
    	fmt.Fprintln(c.Stdout, string(out))
    	return nil
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue Apr 23 21:30:30 GMT 2024
    - 2.5K bytes
    - Viewed (0)
Back to top