Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for Every (0.15 sec)

  1. cmd/xl-storage-disk-id-check.go

    func (e *lockedLastMinuteLatency) add(value time.Duration) {
    	e.addSize(value, 0)
    }
    
    // addSize will add a duration and size.
    func (e *lockedLastMinuteLatency) addSize(value time.Duration, sz int64) {
    	// alloc on every call, so we have a clean entry to swap in.
    	t := time.Now().Unix()
    	e.init.Do(func() {
    		e.cached.Store(&AccElem{})
    		atomic.StoreInt64(&e.cachedSec, t)
    	})
    	acc := e.cached.Load()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 33K bytes
    - Viewed (0)
  2. cmd/erasure-server-pool-rebalance.go

    	doneCh := make(chan error, 1)
    	defer xioutil.SafeClose(doneCh)
    
    	// Save rebalance.bin periodically.
    	go func() {
    		// Update rebalance.bin periodically once every 5-10s, chosen randomly
    		// to avoid multiple pool leaders herding to update around the same
    		// time.
    		r := rand.New(rand.NewSource(time.Now().UnixNano()))
    		randSleepFor := func() time.Duration {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 26 19:29:28 GMT 2024
    - 27.2K bytes
    - Viewed (0)
  3. cmd/storage-rest-server.go

    		c.done = nil
    	}
    	return c.rc.Close()
    }
    
    // keepHTTPReqResponseAlive can be used to avoid timeouts with long storage
    // operations, such as bitrot verification or data usage scanning.
    // Every 10 seconds a space character is sent.
    // keepHTTPReqResponseAlive will wait for the returned body to be read before starting the ticker.
    // The returned function should always be called to release resources.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 44.8K bytes
    - Viewed (0)
  4. cmd/batch-rotate.go

    					stopFn(result, nil)
    				}
    				ri.trackCurrentBucketObject(r.Bucket, result, success)
    				ri.RetryAttempts = attempts
    				globalBatchJobsMetrics.save(job.ID, ri)
    				// persist in-memory state to disk after every 10secs.
    				batchLogIf(ctx, ri.updateAfter(ctx, api, 10*time.Second, job))
    				if success {
    					break
    				}
    				if delay > 0 {
    					time.Sleep(delay + time.Duration(rnd.Float64()*float64(delay)))
    				}
    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)
  5. internal/grid/types.go

    // call Recycle() when the object is no longer needed.
    // The recycler should handle nil pointers.
    type Recycler interface {
    	Recycle()
    }
    
    // MSS is a map[string]string that can be serialized.
    // It is not very efficient, but it is only used for easy parameter passing.
    type MSS map[string]string
    
    // Get returns the value for the given key.
    func (m *MSS) Get(key string) string {
    	if m == nil {
    		return ""
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Apr 01 23:42:09 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  6. cmd/batch-expire.go

    	go func() {
    		saveTicker := time.NewTicker(10 * time.Second)
    		defer saveTicker.Stop()
    		for {
    			select {
    			case <-saveTicker.C:
    				// persist in-memory state to disk after every 10secs.
    				batchLogIf(ctx, ri.updateAfter(ctx, api, 10*time.Second, job))
    
    			case <-ctx.Done():
    				// persist in-memory state immediately before exiting due to context cancellation.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 21K bytes
    - Viewed (1)
  7. cmd/common-main.go

    			err = fmt.Errorf("Unable to load TLS certificate '%s,%s': %w", certFile, keyFile, err)
    			bootLogIf(GlobalContext, err, logger.ErrorKind)
    		}
    	}
    	secureConn = true
    
    	// Certs might be symlinks, reload them every 10 seconds.
    	manager.UpdateReloadDuration(10 * time.Second)
    
    	// syscall.SIGHUP to reload the certs.
    	manager.ReloadOnSignal(syscall.SIGHUP)
    
    	return x509Certs, manager, secureConn, nil
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat May 04 00:17:57 GMT 2024
    - 35.8K bytes
    - Viewed (2)
  8. cmd/local-locker_test.go

    	}
    	// Each Lock has m entries
    	if len(l.lockMap) != len(rResources)+len(wResources)*m {
    		t.Fatalf("lockmap len, got %d, want %d + %d", len(l.lockMap), len(rResources), len(wResources)*m)
    	}
    	// A UID is added for every resource
    	if len(l.lockUID) != len(rResources)*2+len(wResources)*m {
    		t.Fatalf("lockUID len, got %d, want %d + %d", len(l.lockUID), len(rResources)*2, len(wResources)*m)
    	}
    	// RUnlock once...
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Mar 05 04:57:35 GMT 2023
    - 11.8K bytes
    - Viewed (0)
  9. cmd/admin-router.go

    )
    
    var gzipHandler = func() func(http.Handler) http.HandlerFunc {
    	gz, err := gzhttp.NewWrapper(gzhttp.MinSize(1000), gzhttp.CompressionLevel(gzip.BestSpeed))
    	if err != nil {
    		// Static params, so this is very unlikely.
    		logger.Fatal(err, "Unable to initialize server")
    	}
    	return gz
    }()
    
    // Set of handler options as bit flags
    type hFlag uint8
    
    const (
    	// this flag disables gzip compression of responses
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Mar 10 21:09:36 GMT 2024
    - 25.5K bytes
    - Viewed (0)
  10. internal/s3select/csv/reader_contrib_test.go

    			wantColumns:     []string{"header1", "header2", "header3"},
    			wantFields:      "ok1,ok2,ok3\n" + `"a""""b",c` + "\n",
    			wantErr:         io.EOF,
    		},
    		{
    			// This works since LazyQuotes is true, but output is very weird.
    			file:            "invalid-oddquote.csv",
    			recordDelimiter: "\n",
    			fieldDelimiter:  ",",
    			sendErr:         nil,
    			header:          true,
    			wantColumns:     []string{"header1", "header2", "header3"},
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 38.5K bytes
    - Viewed (0)
Back to top