- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for ReadCurrentPodSnapshot (0.44 sec)
-
cni/pkg/nodeagent/pod_cache.go
"istio.io/istio/pkg/maps" "istio.io/istio/pkg/zdsapi" ) var ErrPodNotFound = errors.New("netns not provided, but is needed as pod is not in cache") type PodNetnsCache interface { ReadCurrentPodSnapshot() map[string]WorkloadInfo } // Hold a cache of node local pods with their netns // if we don't know the netns, the pod will still be here with a nil netns. type podNetnsCache struct {
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Fri Apr 12 21:47:31 GMT 2024 - 4.5K bytes - Viewed (0) -
cni/pkg/nodeagent/pod_cache_test.go
} } func TestPodsAppearsWithNilNetnsWhenEnsureIsUsed(t *testing.T) { p := newPodNetnsCache(openNsTestOverride) p.Ensure("123") found := false snap := p.ReadCurrentPodSnapshot() for k, v := range snap { if k == "123" && v == (WorkloadInfo{}) { found = true } } if !found { t.Fatalf("expected pod 123 to be in the cache") } }
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Fri Apr 12 21:47:31 GMT 2024 - 4.2K bytes - Viewed (0) -
cni/pkg/nodeagent/ztunnelserver_test.go
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Fri Apr 12 21:47:31 GMT 2024 - 8.6K bytes - Viewed (0) -
cni/pkg/nodeagent/ztunnelserver.go
} return nil } // TODO ctx is unused here // nolint: unparam func (z *ztunnelServer) sendSnapshot(ctx context.Context, conn *ZtunnelConnection) error { snap := z.pods.ReadCurrentPodSnapshot() for uid, wl := range snap { var resp *zdsapi.WorkloadResponse var err error if wl.Netns != nil { fd := int(wl.Netns.Fd()) log.Infof("Sending local pod %s ztunnel", uid)
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)