- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 32 for do (0.14 sec)
-
cni/pkg/repair/netns.go
} 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 { return res, fmt.Errorf("in host network: %v", err) } return res, 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) -
cni/pkg/plugin/sidecar_iptables_linux.go
return err } netNs, err := getNs(netns) if err != nil { err = fmt.Errorf("failed to open netns %q: %s", netns, err) return err } defer netNs.Close() return netNs.Do(func(_ ns.NetNS) error { log.Infof("============= Start iptables configuration for %v =============", podName) defer log.Infof("============= End iptables configuration for %v =============", podName)
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Thu Apr 18 17:36:41 GMT 2024 - 2.5K bytes - Viewed (0) -
istioctl/pkg/util/handlers/handlers.go
WithScheme(kubelib.IstioScheme, kubelib.IstioScheme.PrioritizedVersionsAllGroups()...). NamespaceParam(ns).DefaultNamespace(). SingleResourceType() builder.ResourceNames("pods", resname) infos, err := builder.Do().Infos() if err != nil { return nil, "", "", "", fmt.Errorf("failed retrieving: %v in the %q namespace", err, ns) } if len(infos) != 1 { return nil, "", "", "", errors.New("expected a resource") }
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Tue Feb 06 15:01:41 GMT 2024 - 6.2K bytes - Viewed (0) -
cni/pkg/nodeagent/net.go
s.currentPodSnapshot.UpsertPodCacheWithNetns(uid, wl) } return nil } func realDependencies() *dep.RealDependencies { return &dep.RealDependencies{ CNIMode: false, // we are in cni, but as we do the netns ourselves, we should keep this as false. NetworkNamespace: "", } } // Remove pod from mesh: pod is not deleted, we just want to remove it from the mesh.
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Tue Apr 30 22:24:38 GMT 2024 - 12.2K bytes - Viewed (1) -
cni/pkg/iptables/iptables.go
// NOTE that this expects to be run from within the HOST network namespace! // // We need to do this specifically to be able to distinguish between traffic coming from different node-level processes // via the nodeIP // - kubelet (node-local healthchecks, which we do not capture) // - kube-proxy (fowarded/proxied traffic from LoadBalancer-backed services, potentially with public IPs, which we must capture)
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Tue May 07 19:54:50 GMT 2024 - 19.7K bytes - Viewed (0) -
istioctl/pkg/writer/envoy/configdump/listener.go
switch v := match.GetOnNoMatch().GetOnMatch().(type) { case *matcher.Matcher_OnMatch_Action: if v.Action.GetName() == name { // TODO this only makes sense in context of a chain... do we need a way to give it context return []string{"ANY"}, true } case *matcher.Matcher_OnMatch_Matcher: ms, f := recurse(name, v.Matcher) if !f { return []string{"NONE"}, true }
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Wed Nov 29 12:37:14 GMT 2023 - 18.1K bytes - Viewed (0) -
cni/pkg/nodeagent/netns_other.go
} func NetnsSet(n NetnsFd) error { return errors.New("not implemented") } func OpenNetns(nspath string) (NetnsCloser, error) { return nil, errors.New("not implemented") } // inspired by netns.Do() but with an existing fd. func NetnsDo(fdable NetnsFd, toRun func() error) error { return errors.New("not implemented")
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Thu Mar 14 09:32:25 GMT 2024 - 1K bytes - Viewed (0) -
cni/pkg/nodeagent/ztunnelserver.go
// Safety: Resp is buffered, so this will not block update.Resp <- updateResponse{ err: err, resp: resp, } case <-time.After(ztunnelKeepAliveCheckInterval): // do a short read, just to see if the connection to ztunnel is // still alive. As ztunnel shouldn't send anything unless we send // something first, we expect to get an os.ErrDeadlineExceeded error
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Fri Apr 12 21:47:31 GMT 2024 - 12.4K bytes - Viewed (0) -
istioctl/cmd/istioctl_test.go
switch fErr.(type) { case istioctlutil.CommandParseError: // do nothing default: t.Errorf("Expected a CommandParseError, but got %q.", fErr) } // we should propagate to subcommands rootCmd = GetRootCmd([]string{"analyze", "--unknown-flag"}) fErr = rootCmd.Execute() switch fErr.(type) { case istioctlutil.CommandParseError: // do nothing default:
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Tue Aug 29 14:53:25 GMT 2023 - 1.5K bytes - Viewed (0) -
cni/pkg/nodeagent/netns_linux.go
} func NetnsSet(n NetnsFd) error { if err := unix.Setns(int(n.Fd()), unix.CLONE_NEWNET); err != nil { return fmt.Errorf("Error switching to ns fd %v: %v", n.Fd(), err) } return nil } // inspired by netns.Do() but with an existing fd. func NetnsDo(fdable NetnsFd, toRun func() error) error { containedCall := func() error { threadNS, err := netns.GetCurrentNS() if err != nil {
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Wed Jan 31 10:05:36 GMT 2024 - 2.7K bytes - Viewed (0)