Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 659 for defer (0.2 sec)

  1. 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 {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Jan 23 16:46:37 GMT 2023
    - 8.3K bytes
    - Viewed (0)
  2. cmd/http-stats.go

    	s.Lock()
    	defer s.Unlock()
    	stats, ok := s.stats[bucket]
    	if !ok {
    		stats = &bucketS3RXTX{
    			s3InputBytes: uint64(n),
    		}
    	} else {
    		stats.s3InputBytes += uint64(n)
    	}
    	s.stats[bucket] = stats
    }
    
    // Increase S3 total output bytes for input bucket
    func (s *bucketConnStats) incS3OutputBytes(bucket string, n int64) {
    	s.Lock()
    	defer s.Unlock()
    	stats, ok := s.stats[bucket]
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Mar 10 09:15:15 GMT 2024
    - 11.4K bytes
    - Viewed (0)
  3. cmd/generic-handlers.go

    			}
    
    			defer logger.AuditLog(r.Context(), w, r, mustGetClaimsFromToken(r))
    			writeErrorResponse(r.Context(), w, errorCodes.ToAPIErr(ErrUnsupportedMetadata), r.URL)
    			return
    		}
    
    		if isHTTPHeaderSizeTooLarge(r.Header) {
    			if ok {
    				tc.FuncName = "handler.ValidRequest"
    				tc.ResponseRecorder.LogErrBody = true
    			}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 11 01:08:52 GMT 2024
    - 20.7K bytes
    - Viewed (0)
  4. internal/config/cache/cache.go

    func (c Config) MatchesSize(size int64) bool {
    	configLock.RLock()
    	defer configLock.RUnlock()
    
    	return c.Enable && c.BlockSize > 0 && size <= c.BlockSize
    }
    
    // Update updates new cache frequency
    func (c *Config) Update(ncfg Config) {
    	configLock.Lock()
    	defer configLock.Unlock()
    
    	c.Enable = ncfg.Enable
    	c.Endpoint = ncfg.Endpoint
    	c.BlockSize = ncfg.BlockSize
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  5. internal/store/queuestore.go

    func (store *QueueStore[_]) Del(key string) error {
    	store.Lock()
    	defer store.Unlock()
    	return store.del(key)
    }
    
    // DelList - Deletes a list of entries from the store.
    // Returns an error even if one key fails to be deleted.
    func (store *QueueStore[_]) DelList(keys []string) error {
    	store.Lock()
    	defer store.Unlock()
    
    	for _, key := range keys {
    		if err := store.del(key); err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Mar 25 16:44:20 GMT 2024
    - 7.1K bytes
    - Viewed (0)
  6. cmd/benchmark-utils_test.go

    	ctx, cancel := context.WithCancel(context.Background())
    	defer cancel()
    	objLayer, disks, err := prepareTestBackend(ctx, instanceType)
    	if err != nil {
    		b.Fatalf("Failed obtaining Temp Backend: <ERROR> %s", err)
    	}
    	// cleaning up the backend by removing all the directories and files created on function return.
    	defer removeRoots(disks)
    
    	// uses *testing.B and the object Layer to run the benchmark.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Dec 23 15:46:00 GMT 2022
    - 8.2K bytes
    - Viewed (0)
  7. 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",
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Apr 30 22:24:38 GMT 2024
    - 16.4K bytes
    - Viewed (0)
  8. internal/dsync/drwmutex.go

    	ctx, cancel := context.WithCancel(context.Background())
    
    	dm.m.Lock()
    	dm.cancelRefresh = cancel
    	dm.m.Unlock()
    
    	go func() {
    		defer cancel()
    
    		refreshTimer := time.NewTimer(dm.refreshInterval)
    		defer refreshTimer.Stop()
    
    		for {
    			select {
    			case <-ctx.Done():
    				return
    			case <-refreshTimer.C:
    				noQuorum, err := refreshLock(ctx, dm.clnt, id, source, quorum)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 19.7K bytes
    - Viewed (0)
  9. cni/pkg/nodeagent/informers_test.go

    	"istio.io/istio/pkg/test/util/assert"
    )
    
    func TestExistingPodAddedWhenNsLabeled(t *testing.T) {
    	setupLogging()
    	NodeName = "testnode"
    	ctx, cancel := context.WithCancel(context.Background())
    	defer cancel()
    
    	pod := &corev1.Pod{
    		ObjectMeta: metav1.ObjectMeta{
    			Name:      "test",
    			Namespace: "test",
    		},
    		Spec: corev1.PodSpec{
    			NodeName: NodeName,
    		},
    		Status: corev1.PodStatus{
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Thu Feb 08 01:03:24 GMT 2024
    - 15.8K bytes
    - Viewed (0)
  10. internal/config/browser/browser.go

    // GetCSPolicy - Get the Content security Policy
    func (browseCfg *Config) GetCSPolicy() string {
    	configLock.RLock()
    	defer configLock.RUnlock()
    	return browseCfg.CSPPolicy
    }
    
    // GetHSTSSeconds - Get the Content security Policy
    func (browseCfg *Config) GetHSTSSeconds() int {
    	configLock.RLock()
    	defer configLock.RUnlock()
    	return browseCfg.HSTSSeconds
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 11 01:10:30 GMT 2024
    - 5.8K bytes
    - Viewed (0)
Back to top