- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 640 for defer (0.04 sec)
-
cmd/iam-store.go
cache := store.rlock() defer store.runlock() u, ok := cache.iamUsersMap[user] if !ok { // Check the sts map u, ok = cache.iamSTSAccountsMap[user] } return u, ok } // GetMappedPolicy - fetches mapped policy from memory. func (store *IAMStoreSys) GetMappedPolicy(name string, isGroup bool) (MappedPolicy, bool) { cache := store.rlock() defer store.runlock() if isGroup {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Oct 14 16:35:37 UTC 2024 - 83.2K bytes - Viewed (0) -
cni/pkg/nodeagent/net_test.go
}, Spec: corev1.PodSpec{ Containers: containers, }, Status: podStatus, } } func TestServerAddPod(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() setupLogging() fixture := getTestFixure(ctx) netServer := fixture.netServer ztunnelServer := fixture.ztunnelServer podMeta := metav1.ObjectMeta{ Name: "foo", Namespace: "bar",
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Thu Jul 25 16:13:38 UTC 2024 - 10.7K bytes - Viewed (0) -
cni/pkg/nodeagent/pod_cache.go
func (p *podNetnsCache) Get(uid string) Netns { // lock current snapshot pod map p.mu.RLock() defer p.mu.RUnlock() if info, f := p.currentPodCache[uid]; f { return info.Netns } return nil } // make sure uid is in the cache, even if we don't have a netns func (p *podNetnsCache) Ensure(uid string) { p.mu.Lock() defer p.mu.Unlock() if _, ok := p.currentPodCache[uid]; !ok { p.currentPodCache[uid] = WorkloadInfo{}
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Fri May 31 17:18:11 UTC 2024 - 4.3K bytes - Viewed (0) -
cmd/callhome.go
// cycle back return 'true' return true } ctx = lkctx.Context() defer locker.Unlock(lkctx) // Perform callhome once and then keep running it at regular intervals. performCallhome(ctx) callhomeTimer := time.NewTimer(globalCallhomeConfig.FrequencyDur()) defer callhomeTimer.Stop() for { if !globalCallhomeConfig.Enabled() { // Stop the processing as callhome got disabled
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 17 16:53:34 UTC 2024 - 5.3K bytes - Viewed (0) -
cmd/local-locker.go
if len(args.Resources) > maxDeleteList { return false, fmt.Errorf("internal error: localLocker.Lock called with more than %d resources", maxDeleteList) } l.mutex.Lock() defer l.mutex.Unlock() if !l.canTakeLock(args.Resources...) { // Not all locks can be taken on resources, // reject it completely. return false, nil } // No locks held on the all resources, so claim write
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jul 24 10:24:01 UTC 2024 - 10.7K bytes - Viewed (0) -
cmd/erasure.go
go func() { // Add jitter to the update time so multiple sets don't sync up. updateTime := 30*time.Second + time.Duration(float64(10*time.Second)*rand.Float64()) t := time.NewTicker(updateTime) defer t.Stop() defer saverWg.Done() var lastSave time.Time for { select { case <-t.C: if cache.Info.LastUpdate.Equal(lastSave) { continue }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Oct 04 22:23:33 UTC 2024 - 16.1K bytes - Viewed (0) -
internal/dsync/dsync-server_test.go
time.Sleep(time.Duration(d)) } l.mutex.Lock() defer l.mutex.Unlock() reply = !l.lockNotFound return reply, nil } func (l *lockServer) ForceUnlock(args *LockArgs) (reply bool, err error) { if d := atomic.LoadInt64(&l.responseDelay); d != 0 { time.Sleep(time.Duration(d)) } l.mutex.Lock() defer l.mutex.Unlock() if len(args.UID) != 0 {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jan 23 16:46:37 UTC 2023 - 8.3K bytes - Viewed (0) -
cmd/server-startup-msg_test.go
} } // Test printing server common message. func TestPrintServerCommonMessage(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() obj, fsDir, err := prepareFS(ctx) if err != nil { t.Fatal(err) } defer os.RemoveAll(fsDir) if err = newTestConfig(globalMinioDefaultRegion, obj); err != nil { t.Fatal(err) } apiEndpoints := []string{"http://127.0.0.1:9000"}
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jul 12 20:51:54 UTC 2024 - 3K bytes - Viewed (0) -
cmd/erasure-server-pool.go
func (z *erasureServerPools) NSScanner(ctx context.Context, updates chan<- DataUsageInfo, wantCycle uint32, healScanMode madmin.HealScanMode) error { // Updates must be closed before we return. defer xioutil.SafeClose(updates) ctx, cancel := context.WithCancel(ctx) defer cancel() var wg sync.WaitGroup var mu sync.Mutex var results []dataUsageCache var firstErr error allBuckets, err := z.ListBuckets(ctx, BucketOptions{})
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Sep 29 22:40:36 UTC 2024 - 89.8K bytes - Viewed (0) -
cni/pkg/plugin/cnieventclient_test.go
testServer := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { res.WriteHeader(http.StatusOK) res.Write([]byte("server happy")) })) defer func() { testServer.Close() }() cniC := fakeCNIEventClient(testServer.URL) err := PushCNIEvent(cniC, fakeCmdArgs, []*cniv1.IPConfig{&fakePrevResultIPConfig}, "testpod", "testns") assert.NoError(t, err) }
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Tue Jul 02 18:48:50 UTC 2024 - 4.2K bytes - Viewed (0)