MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / LeakyBucketClone

Method LeakyBucketClone

base/util_testing.go:78–85  ·  view source on GitHub ↗

LeakyBucketClone wraps the underlying bucket on the TestBucket with a LeakyBucket and returns a new TestBucket handle.

(c LeakyBucketConfig)

Source from the content-addressed store, hash-verified

76
77// LeakyBucketClone wraps the underlying bucket on the TestBucket with a LeakyBucket and returns a new TestBucket handle.
78func (tb *TestBucket) LeakyBucketClone(c LeakyBucketConfig) *TestBucket {
79 return &TestBucket{
80 Bucket: NewLeakyBucket(tb.Bucket, c),
81 BucketSpec: tb.BucketSpec,
82 closeFn: tb.Close,
83 t: tb.t,
84 }
85}
86
87// NoCloseClone returns a leaky bucket with a no-op close function for the given bucket.
88func NoCloseClone(b Bucket) *LeakyBucket {

Calls 1

NewLeakyBucketFunction · 0.85