Search Options

Results per page
Sort
Preferred Languages
Advance

Results 411 - 420 of 713 for errf (0.03 sec)

  1. internal/cachevalue/cache.go

    		// There is a new value, release lock and return it.
    		if v = t.val.Load(); v != nil {
    			return *v, nil
    		}
    	}
    
    	if err := t.update(ctx); err != nil {
    		var empty T
    		return empty, err
    	}
    
    	return *t.val.Load(), nil
    }
    
    // Get will return a cached value or fetch a new one.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 12:50:46 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  2. cmd/event-notification.go

    	config := meta.notificationConfig
    	if config == nil {
    		return
    	}
    	region := globalSite.Region()
    	config.SetRegion(region)
    	if err := config.Validate(region, globalEventNotifier.targetList); err != nil {
    		if _, ok := err.(*event.ErrARNNotFound); !ok {
    			internalLogIf(GlobalContext, err)
    		}
    	}
    	evnot.AddRulesMap(bucket, config.ToRulesMap())
    }
    
    // Targets returns all the registered targets
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jun 21 22:22:24 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  3. tests/migrate_test.go

    	var err error
    	err = DB.AutoMigrate(&Coupon{})
    	if err != nil {
    		t.Fatalf("AutoMigrate err:%v", err)
    	}
    	err = DB.Table("coupon_product_1").AutoMigrate(&CouponProduct{})
    	if err != nil {
    		t.Fatalf("AutoMigrate err:%v", err)
    	}
    	err = DB.Table("coupon_product_2").AutoMigrate(&CouponProduct{})
    	if err != nil {
    		t.Fatalf("AutoMigrate err:%v", err)
    	}
    
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Mar 18 11:24:16 UTC 2024
    - 56.2K bytes
    - Viewed (0)
  4. internal/store/queuestore_test.go

    	defer func() {
    		if err := tearDownQueueStore(); err != nil {
    			t.Fatal("Failed to tear down store ", err)
    		}
    	}()
    	store, err := setUpQueueStore(queueDir, 100)
    	if err != nil {
    		t.Fatal("Failed to create a queue store ", err)
    	}
    	// Put 100 items.
    	for i := 0; i < 100; i++ {
    		if _, err := store.Put(testItem); err != nil {
    			t.Fatal("Failed to put to queue store ", err)
    		}
    	}
    	// Count the items.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  5. internal/grid/muxserver.go

    	if !m.checkSeq(seq) {
    		msg := fmt.Sprintf("receive sequence number mismatch. want %d, got %d", m.RecvSeq, seq)
    		return pongMsg{Err: &msg}
    	}
    	select {
    	case <-m.ctx.Done():
    		err := context.Cause(m.ctx).Error()
    		return pongMsg{Err: &err}
    	default:
    		atomic.StoreInt64(&m.LastPing, time.Now().Unix())
    		return pongMsg{}
    	}
    }
    
    // disconnect will disconnect the mux.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jun 07 15:51:52 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  6. internal/lock/lock_test.go

    	}
    }
    
    // Tests lock and unlock semantics.
    func TestLockAndUnlock(t *testing.T) {
    	f, err := os.CreateTemp("", "lock")
    	if err != nil {
    		t.Fatal(err)
    	}
    	f.Close()
    	defer func() {
    		err = os.Remove(f.Name())
    		if err != nil {
    			t.Fatal(err)
    		}
    	}()
    
    	// lock the file
    	l, err := LockedOpenFile(f.Name(), os.O_WRONLY, 0o600)
    	if err != nil {
    		t.Fatal(err)
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 19 18:05:16 UTC 2022
    - 3.6K bytes
    - Viewed (0)
  7. cmd/healthcheck-handler.go

    		defer cancel()
    
    		if _, err := GlobalKMS.GenerateKey(ctx, &kms.GenerateKeyRequest{AssociatedData: kms.Context{"healthcheck": ""}}); err != nil {
    			switch r.Method {
    			case http.MethodHead:
    				apiErr := toAPIError(r.Context(), err)
    				writeResponse(w, apiErr.HTTPStatusCode, nil, mimeNone)
    			case http.MethodGet:
    				writeErrorResponse(r.Context(), w, toAPIError(r.Context(), err), r.URL)
    			}
    			return
    		}
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Jun 26 07:44:34 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  8. cmd/erasure-server-pool-rebalance_gen_test.go

    	v := rebalanceInfo{}
    	bts, err := v.MarshalMsg(nil)
    	if err != nil {
    		t.Fatal(err)
    	}
    	left, err := v.UnmarshalMsg(bts)
    	if err != nil {
    		t.Fatal(err)
    	}
    	if len(left) > 0 {
    		t.Errorf("%d bytes left over after UnmarshalMsg(): %q", len(left), left)
    	}
    
    	left, err = msgp.Skip(bts)
    	if err != nil {
    		t.Fatal(err)
    	}
    	if len(left) > 0 {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 25 19:36:57 UTC 2022
    - 11K bytes
    - Viewed (0)
  9. cmd/os_windows.go

    	globAll := filepath.Clean(dirPath) + `\*`
    	globAllP, err := syscall.UTF16PtrFromString(globAll)
    	if err != nil {
    		return errInvalidArgument
    	}
    	data := &syscall.Win32finddata{}
    	handle, err := syscall.FindFirstFile(globAllP, data)
    	if err != nil {
    		if err = syscallErrToFileErr(dirPath, err); err == errFileNotFound {
    			return nil
    		}
    		return err
    	}
    	defer syscall.FindClose(handle)
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Oct 18 18:08:15 UTC 2023
    - 5.1K bytes
    - Viewed (0)
  10. cmd/os-reliable.go

    	}
    
    	if err = checkPathLength(srcFilePath); err != nil {
    		return err
    	}
    	if err = checkPathLength(dstFilePath); err != nil {
    		return err
    	}
    
    	if err = reliableRename(srcFilePath, dstFilePath, baseDir); err != nil {
    		switch {
    		case isSysErrNotDir(err) && !osIsNotExist(err):
    			// Windows can have both isSysErrNotDir(err) and osIsNotExist(err) returning
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Apr 22 17:49:30 UTC 2024
    - 5.8K bytes
    - Viewed (0)
Back to top