Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for bucketsThrottle (0.22 sec)

  1. internal/bucket/bandwidth/monitor.go

    	"golang.org/x/time/rate"
    )
    
    //msgp:ignore bucketThrottle Monitor
    
    type bucketThrottle struct {
    	*rate.Limiter
    	NodeBandwidthPerSec int64
    }
    
    // Monitor holds the state of the global bucket monitor
    type Monitor struct {
    	tlock sync.RWMutex // mutex for bucket throttling
    	mlock sync.RWMutex // mutex for bucket measurement
    
    	bucketsThrottle    map[BucketOptions]*bucketThrottle
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Feb 19 22:54:46 GMT 2024
    - 6K bytes
    - Viewed (0)
  2. internal/bucket/bandwidth/monitor_test.go

    		tt := tt
    		t.Run(tt.name, func(t *testing.T) {
    			t.Parallel()
    			thr := bucketThrottle{
    				NodeBandwidthPerSec: 1024 * 1024,
    			}
    			th := make(map[BucketOptions]*bucketThrottle)
    			th[BucketOptions{Name: "bucket", ReplicationARN: "arn"}] = &thr
    			m := &Monitor{
    				bucketsMeasurement: tt.fields.activeBuckets,
    				bucketsThrottle:    th,
    				NodeCount:          1,
    			}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Sep 06 03:21:59 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  3. internal/bucket/bandwidth/reader.go

    package bandwidth
    
    import (
    	"context"
    	"io"
    	"math"
    )
    
    // MonitoredReader represents a throttled reader subject to bandwidth monitoring
    type MonitoredReader struct {
    	r        io.Reader
    	throttle *bucketThrottle
    	ctx      context.Context // request context
    	lastErr  error           // last error reported, if this non-nil all reads will fail.
    	m        *Monitor
    	opts     *MonitorReaderOptions
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Sep 06 03:21:59 GMT 2023
    - 3.1K bytes
    - Viewed (0)
Back to top