Documentation ¶
Index ¶
- Variables
- type FileStorage
- func (i *FileStorage) CancelWrites(_ int64, _ int64)
- func (i *FileStorage) Close() error
- func (i *FileStorage) Flush() error
- func (i *FileStorage) ReadAt(buffer []byte, offset int64) (int, error)
- func (i *FileStorage) Size() uint64
- func (i *FileStorage) WriteAt(buffer []byte, offset int64) (int, error)
- type FileStorageSparse
- func (i *FileStorageSparse) CancelWrites(_ int64, _ int64)
- func (i *FileStorageSparse) Close() error
- func (i *FileStorageSparse) Flush() error
- func (i *FileStorageSparse) ReadAt(buffer []byte, offset int64) (int, error)
- func (i *FileStorageSparse) Size() uint64
- func (i *FileStorageSparse) WriteAt(buffer []byte, offset int64) (int, error)
- type MemoryStorage
- func (i *MemoryStorage) CancelWrites(_ int64, _ int64)
- func (i *MemoryStorage) Close() error
- func (i *MemoryStorage) Flush() error
- func (i *MemoryStorage) ReadAt(buffer []byte, offset int64) (int, error)
- func (i *MemoryStorage) Size() uint64
- func (i *MemoryStorage) WriteAt(buffer []byte, offset int64) (int, error)
- type S3Metrics
- type S3Storage
- func (i *S3Storage) CancelWrites(offset int64, length int64)
- func (i *S3Storage) Close() error
- func (i *S3Storage) Flush() error
- func (i *S3Storage) Metrics() *S3Metrics
- func (i *S3Storage) ReadAt(buffer []byte, offset int64) (int, error)
- func (i *S3Storage) SetReadWriteEnabled(disabledReads bool, disabledWrites bool)
- func (i *S3Storage) Size() uint64
- func (i *S3Storage) WriteAt(buffer []byte, offset int64) (int, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrDisabled = errors.New("disabled")
)
Functions ¶
This section is empty.
Types ¶
type FileStorage ¶
type FileStorage struct { storage.ProviderWithEvents // contains filtered or unexported fields }
*
- Simple fixed size file storage provider *
func NewFileStorage ¶
func NewFileStorage(f string, size int64) (*FileStorage, error)
func NewFileStorageCreate ¶
func NewFileStorageCreate(f string, size int64) (*FileStorage, error)
func (*FileStorage) CancelWrites ¶ added in v0.0.5
func (i *FileStorage) CancelWrites(_ int64, _ int64)
func (*FileStorage) Close ¶
func (i *FileStorage) Close() error
func (*FileStorage) Flush ¶
func (i *FileStorage) Flush() error
func (*FileStorage) Size ¶
func (i *FileStorage) Size() uint64
type FileStorageSparse ¶ added in v0.0.2
type FileStorageSparse struct { storage.ProviderWithEvents // contains filtered or unexported fields }
*
- Simple sparse file storage provider *
- - Reads return error if no data has been written for a block yet.
- - Partial block reads supported as long as the blocks exist.
- - Partial block writes supported as long as the blocks exist (Have already been written to completely). *
func NewFileStorageSparse ¶ added in v0.0.3
func NewFileStorageSparse(f string, size uint64, blockSize int) (*FileStorageSparse, error)
func NewFileStorageSparseCreate ¶ added in v0.0.2
func NewFileStorageSparseCreate(f string, size uint64, blockSize int) (*FileStorageSparse, error)
func (*FileStorageSparse) CancelWrites ¶ added in v0.0.5
func (i *FileStorageSparse) CancelWrites(_ int64, _ int64)
func (*FileStorageSparse) Close ¶ added in v0.0.2
func (i *FileStorageSparse) Close() error
func (*FileStorageSparse) Flush ¶ added in v0.0.2
func (i *FileStorageSparse) Flush() error
func (*FileStorageSparse) ReadAt ¶ added in v0.0.2
func (i *FileStorageSparse) ReadAt(buffer []byte, offset int64) (int, error)
func (*FileStorageSparse) Size ¶ added in v0.0.2
func (i *FileStorageSparse) Size() uint64
type MemoryStorage ¶
type MemoryStorage struct { storage.ProviderWithEvents // contains filtered or unexported fields }
*
- Simple fixed size memory based storage provider * *
func NewMemoryStorage ¶
func NewMemoryStorage(size int) *MemoryStorage
func (*MemoryStorage) CancelWrites ¶ added in v0.0.5
func (i *MemoryStorage) CancelWrites(_ int64, _ int64)
func (*MemoryStorage) Close ¶ added in v0.0.2
func (i *MemoryStorage) Close() error
func (*MemoryStorage) Flush ¶
func (i *MemoryStorage) Flush() error
func (*MemoryStorage) ReadAt ¶
func (i *MemoryStorage) ReadAt(buffer []byte, offset int64) (int, error)
func (*MemoryStorage) Size ¶
func (i *MemoryStorage) Size() uint64
type S3Metrics ¶ added in v0.0.10
type S3Metrics struct { BlocksWCount uint64 BlocksWBytes uint64 BlocksWDataBytes uint64 BlocksWTime time.Duration BlocksWPreRCount uint64 BlocksWPreRBytes uint64 BlocksWPreRTime time.Duration BlocksRCount uint64 BlocksRBytes uint64 BlocksRDataBytes uint64 BlocksRTime time.Duration ActiveReads uint64 ActiveWrites uint64 }
type S3Storage ¶ added in v0.0.2
type S3Storage struct { storage.ProviderWithEvents // contains filtered or unexported fields }
func NewS3Storage ¶ added in v0.0.2
func NewS3StorageCreate ¶ added in v0.0.2
func NewS3StorageDummy ¶ added in v0.0.10
func (*S3Storage) CancelWrites ¶ added in v0.0.5
func (*S3Storage) SetReadWriteEnabled ¶ added in v0.1.5
Click to show internal directories.
Click to hide internal directories.