Documentation
¶
Overview ¶
Package sharded implements common support for sharded blob providers, such as filesystem or webdav.
Index ¶
- type Impl
- type Storage
- func (s Storage) DeleteBlob(ctx context.Context, blobID blob.ID) error
- func (s Storage) GetBlob(ctx context.Context, blobID blob.ID, offset, length int64) ([]byte, error)
- func (s Storage) GetShardedPathAndFilePath(blobID blob.ID) (shardPath, filePath string)
- func (s Storage) ListBlobs(ctx context.Context, prefix blob.ID, callback func(blob.Metadata) error) error
- func (s Storage) PutBlob(ctx context.Context, blobID blob.ID, data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Impl ¶
type Impl interface { GetBlobFromPath(ctx context.Context, dirPath, filePath string, offset, length int64) ([]byte, error) PutBlobInPath(ctx context.Context, dirPath, filePath string, data []byte) error DeleteBlobInPath(ctx context.Context, dirPath, filePath string) error ReadDir(ctx context.Context, path string) ([]os.FileInfo, error) }
Impl must be implemented by underlying provided.
type Storage ¶
Storage provides common implementation of sharded storage.
func (Storage) DeleteBlob ¶
DeleteBlob implements blob.Storage
func (Storage) GetShardedPathAndFilePath ¶
GetShardedPathAndFilePath returns the path of the shard and file name within the shard for a given blob ID.
Click to show internal directories.
Click to hide internal directories.