Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 399 for defer (0.14 sec)

  1. internal/event/targetlist.go

    			continue
    		}
    		wg.Add(1)
    		go func(id TargetID, target Target) {
    			list.currentSendCalls.Add(1)
    			list.incCurrentSendCalls(id)
    			list.incTotalEvents(id)
    			defer list.decCurrentSendCalls(id)
    			defer list.currentSendCalls.Add(-1)
    			defer wg.Done()
    
    			if err := target.Save(event); err != nil {
    				list.eventsErrorsTotal.Add(1)
    				list.incFailedEvents(id)
    				reqInfo := &logger.ReqInfo{}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 9.2K bytes
    - Viewed (0)
  2. 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)
  3. cmd/jwt_test.go

    }
    
    // Tests web request authenticator.
    func TestWebRequestAuthenticate(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)
    	}
    
    	creds := globalActiveCred
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 19 16:45:14 GMT 2024
    - 4.5K bytes
    - Viewed (0)
  4. cmd/os_unix.go

    		fd, err = openFileWithFD(dirPath, os.O_RDONLY, 0o666)
    		if err != nil {
    			return nil, osErrToFileErr(err)
    		}
    	}
    	defer syscall.Close(fd)
    
    	bufp := direntPool.Get().(*[]byte)
    	defer direntPool.Put(bufp)
    	buf := *bufp
    
    	nameTmp := direntNamePool.Get().(*[]byte)
    	defer direntNamePool.Put(nameTmp)
    	tmp := *nameTmp
    
    	boff := 0 // starting read position in buf
    	nbuf := 0 // end valid data in buf
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  5. cmd/metacache-stream_test.go

    }
    
    func loadMetacacheSampleEntries(t testing.TB) metaCacheEntriesSorted {
    	r := loadMetacacheSample(t)
    	defer r.Close()
    	entries, err := r.readN(-1, false, true, false, "")
    	if err != io.EOF {
    		t.Fatal(err)
    	}
    
    	return entries
    }
    
    func Test_metacacheReader_readNames(t *testing.T) {
    	r := loadMetacacheSample(t)
    	defer r.Close()
    	names, err := r.readNames(-1)
    	if err != io.EOF {
    		t.Fatal(err)
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 15K bytes
    - Viewed (0)
  6. cmd/storage-rest-client.go

    	respBody, err := client.call(ctx, storageRESTMethodReadVersion, values, nil, -1)
    	if err != nil {
    		return fi, err
    	}
    	defer xhttp.DrainBody(respBody)
    
    	dec := msgpNewReader(respBody)
    	defer readMsgpReaderPoolPut(dec)
    
    	err = fi.DecodeMsg(dec)
    	return fi, err
    }
    
    // ReadXL - reads all contents of xl.meta of a file.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 26.1K bytes
    - Viewed (0)
  7. internal/store/batch.go

    func (b *Batch[K, T]) GetByKey(key K) (T, bool) {
    	b.Lock()
    	defer b.Unlock()
    
    	item, ok := b.items[key]
    	return item, ok
    }
    
    // Len returns the no of items in the batch
    func (b *Batch[K, T]) Len() int {
    	b.Lock()
    	defer b.Unlock()
    
    	return len(b.keys)
    }
    
    // IsFull checks if the batch is full or not
    func (b *Batch[K, T]) IsFull() bool {
    	b.Lock()
    	defer b.Unlock()
    
    	return b.isFull()
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Oct 07 15:07:38 GMT 2023
    - 2.5K bytes
    - Viewed (0)
  8. cmd/tier.go

    }
    
    func (t *tierMetrics) logSuccess(tier string) {
    	t.Lock()
    	defer t.Unlock()
    
    	stat := t.requestsCount[tier]
    	stat.success++
    	t.requestsCount[tier] = stat
    }
    
    func (t *tierMetrics) logFailure(tier string) {
    	t.Lock()
    	defer t.Unlock()
    
    	stat := t.requestsCount[tier]
    	stat.failure++
    	t.requestsCount[tier] = stat
    }
    
    var (
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 17 05:09:58 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  9. 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 {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Apr 27 10:04:10 GMT 2024
    - 75.2K bytes
    - Viewed (2)
  10. internal/grid/muxclient.go

    // respHandler
    func (m *muxClient) handleOneWayStream(respHandler chan<- Response, respServer <-chan Response) {
    	if debugPrint {
    		start := time.Now()
    		defer func() {
    			fmt.Println("Mux", m.MuxID, "Request took", time.Since(start).Round(time.Millisecond))
    		}()
    	}
    	defer func() {
    		// addErrorNonBlockingClose will close the response channel
    		// - maybe async, so we shouldn't do it here.
    		if m.respErr.Load() == nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 14.2K bytes
    - Viewed (0)
Back to top