Documentation ¶
Index ¶
- func NewShardedDownloader[TReference ShardedReference](shards []object.Downloader[TReference]) object.Downloader[TReference]
- func NewShardedUploader[TReference ShardedReference, TLease any](shards []object.Uploader[TReference, TLease]) object.Uploader[TReference, TLease]
- type Picker
- type ShardedReference
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewShardedDownloader ¶
func NewShardedDownloader[TReference ShardedReference](shards []object.Downloader[TReference]) object.Downloader[TReference]
NewShardedDownloader creates a decorator for one or more object.Downloaders that spreads out incoming requests based on the provided reference.
func NewShardedUploader ¶
func NewShardedUploader[TReference ShardedReference, TLease any](shards []object.Uploader[TReference, TLease]) object.Uploader[TReference, TLease]
NewShardedUploader creates a decorator for one or more object.Uploaders that spreads out incoming requests based on the provided reference.
Types ¶
type Picker ¶
type Picker struct {
// contains filtered or unexported fields
}
Picker of shards. Based on opaque data, Picker computes a hash and uses it to select a backend with a uniform distribution.
type ShardedReference ¶
type ShardedReference interface {
GetRawReference() []byte
}
Click to show internal directories.
Click to hide internal directories.