Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 47 for defer (0.22 sec)

  1. internal/grid/grid_test.go

    	connRemoteLocal := remote.Connection(localHost)
    
    	t.Run("testStreamRoundtrip", func(t *testing.T) {
    		defer timeout(5 * time.Second)()
    		testStreamRoundtrip(t, local, remote)
    		assertNoActive(t, connRemoteLocal)
    		assertNoActive(t, connLocalToRemote)
    	})
    	t.Run("testStreamCancel", func(t *testing.T) {
    		defer timeout(5 * time.Second)()
    		testStreamCancel(t, local, remote)
    		assertNoActive(t, connRemoteLocal)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Apr 30 15:03:35 GMT 2024
    - 30.1K bytes
    - Viewed (0)
  2. cmd/bucket-targets.go

    func (sys *BucketTargetSys) isOffline(ep *url.URL) bool {
    	sys.hMutex.RLock()
    	defer sys.hMutex.RUnlock()
    	if h, ok := sys.hc[ep.Host]; ok {
    		return !h.Online
    	}
    	go sys.initHC(ep)
    	return false
    }
    
    // markOffline sets endpoint to offline if network i/o timeout seen.
    func (sys *BucketTargetSys) markOffline(ep *url.URL) {
    	sys.hMutex.Lock()
    	defer sys.hMutex.Unlock()
    	if h, ok := sys.hc[ep.Host]; ok {
    		h.Online = false
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:09:56 GMT 2024
    - 20.9K bytes
    - Viewed (0)
  3. cmd/handler-api.go

    }
    
    func (t *apiConfig) odirectEnabled() bool {
    	t.mu.RLock()
    	defer t.mu.RUnlock()
    
    	return t.enableODirect
    }
    
    func (t *apiConfig) shouldGzipObjects() bool {
    	t.mu.RLock()
    	defer t.mu.RUnlock()
    
    	return t.gzipObjects
    }
    
    func (t *apiConfig) permitRootAccess() bool {
    	t.mu.RLock()
    	defer t.mu.RUnlock()
    
    	return t.rootAccess
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 20:08:20 GMT 2024
    - 10K bytes
    - Viewed (0)
  4. 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)
  5. 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{})
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 20:08:20 GMT 2024
    - 80.5K bytes
    - Viewed (0)
  6. cmd/batch-handlers.go

    	if ri == nil {
    		return
    	}
    
    	ri.mu.Lock()
    	defer ri.mu.Unlock()
    
    	ri.Bucket = bucket
    	ri.Object = info.Name
    	ri.countItem(info.Size, info.DeleteMarker, success)
    }
    
    func (ri *batchJobInfo) trackCurrentBucketBatch(bucket string, batch []ObjectInfo) {
    	if ri == nil {
    		return
    	}
    
    	ri.mu.Lock()
    	defer ri.mu.Unlock()
    
    	ri.Bucket = bucket
    	for i := range batch {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun May 05 16:56:21 GMT 2024
    - 55.2K bytes
    - Viewed (0)
  7. cmd/erasure-object.go

    		pool := globalBytePoolCap.Load()
    		bufA := pool.Get()
    		bufB := pool.Get()
    		defer pool.Put(bufA)
    		defer pool.Put(bufB)
    		ra, err := readahead.NewReaderBuffer(data, [][]byte{bufA[:fi.Erasure.BlockSize], bufB[:fi.Erasure.BlockSize]})
    		if err == nil {
    			toEncode = ra
    			defer ra.Close()
    		}
    		bugLogIf(ctx, err)
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun May 05 16:56:21 GMT 2024
    - 77.2K bytes
    - Viewed (2)
  8. cmd/erasure-server-pool-decom.go

    	}
    
    	z.poolMetaMutex.Lock()
    	defer z.poolMetaMutex.Unlock()
    
    	z.poolMeta = meta
    	return nil
    }
    
    func (z *erasureServerPools) DecommissionCancel(ctx context.Context, idx int) (err error) {
    	if idx < 0 {
    		return errInvalidArgument
    	}
    
    	if z.SinglePool() {
    		return errInvalidArgument
    	}
    
    	z.poolMetaMutex.Lock()
    	defer z.poolMetaMutex.Unlock()
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 15:18:21 GMT 2024
    - 41.5K bytes
    - Viewed (1)
  9. cmd/admin-handlers.go

    		return
    	}
    
    	defer nsLock.Unlock(lkctx)
    	healthCtx, healthCancel := context.WithTimeout(lkctx.Context(), deadline)
    	defer healthCancel()
    
    	go fetchHealthInfo(healthCtx, objectAPI, &query, healthInfoCh, healthInfo)
    
    	setCommonHeaders(w)
    	setEventStreamHeaders(w)
    	w.WriteHeader(http.StatusOK)
    
    	ticker := time.NewTicker(5 * time.Second)
    	defer ticker.Stop()
    
    	for {
    		select {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Apr 29 17:39:04 GMT 2024
    - 97.8K bytes
    - Viewed (2)
  10. cmd/object-handlers.go

    	}
    
    	var buf *bytebufferpool.ByteBuffer
    	if update {
    		if globalCacheConfig.MatchesSize(objInfo.Size) {
    			buf = bytebufferpool.Get()
    			defer bytebufferpool.Put(buf)
    		}
    		defer func() {
    			var data []byte
    			if buf != nil {
    				data = buf.Bytes()
    			}
    
    			asize, err := objInfo.GetActualSize()
    			if err != nil {
    				asize = objInfo.Size
    			}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu May 02 20:15:54 GMT 2024
    - 125.2K bytes
    - Viewed (0)
Back to top