Documentation ¶
Index ¶
- Variables
- func MockStorageBlock(t testing.TB, bucket objstore.Bucket, userID string, minT, maxT int64) tsdb.BlockMeta
- func MockStorageDeletionMark(t testing.TB, bucket objstore.Bucket, userID string, meta tsdb.BlockMeta) *metadata.DeletionMark
- func MockStorageNonCompactionMark(t testing.TB, bucket objstore.Bucket, userID string, meta tsdb.BlockMeta) *metadata.NoCompactMark
- func PrepareFilesystemBucket(t testing.TB) (objstore.InstrumentedBucket, string)
- type MockBucketFailure
- func (m *MockBucketFailure) Delete(ctx context.Context, name string) error
- func (m *MockBucketFailure) Get(ctx context.Context, name string) (io.ReadCloser, error)
- func (m *MockBucketFailure) GetRange(ctx context.Context, name string, off, length int64) (io.ReadCloser, error)
- func (m *MockBucketFailure) IsAccessDeniedErr(err error) bool
- func (m *MockBucketFailure) ReaderWithExpectedErrs(expectedFunc objstore.IsOpFailureExpectedFunc) objstore.BucketReader
- func (m *MockBucketFailure) Upload(ctx context.Context, name string, r io.Reader) error
- func (m *MockBucketFailure) WithExpectedErrs(expectedFunc objstore.IsOpFailureExpectedFunc) objstore.Bucket
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrKeyAccessDeniedError = errors.New("test key access denied")
Functions ¶
func MockStorageBlock ¶
func MockStorageDeletionMark ¶
func MockStorageNonCompactionMark ¶ added in v1.13.0
func PrepareFilesystemBucket ¶ added in v1.7.0
func PrepareFilesystemBucket(t testing.TB) (objstore.InstrumentedBucket, string)
Types ¶
type MockBucketFailure ¶ added in v1.16.0
type MockBucketFailure struct { objstore.Bucket DeleteFailures []string GetFailures map[string]error UploadFailures map[string]error UploadCalls atomic.Int32 GetCalls atomic.Int32 }
func (*MockBucketFailure) Delete ¶ added in v1.16.0
func (m *MockBucketFailure) Delete(ctx context.Context, name string) error
func (*MockBucketFailure) Get ¶ added in v1.16.0
func (m *MockBucketFailure) Get(ctx context.Context, name string) (io.ReadCloser, error)
func (*MockBucketFailure) GetRange ¶ added in v1.16.0
func (m *MockBucketFailure) GetRange(ctx context.Context, name string, off, length int64) (io.ReadCloser, error)
func (*MockBucketFailure) IsAccessDeniedErr ¶ added in v1.16.0
func (m *MockBucketFailure) IsAccessDeniedErr(err error) bool
func (*MockBucketFailure) ReaderWithExpectedErrs ¶ added in v1.16.0
func (m *MockBucketFailure) ReaderWithExpectedErrs(expectedFunc objstore.IsOpFailureExpectedFunc) objstore.BucketReader
func (*MockBucketFailure) WithExpectedErrs ¶ added in v1.16.0
func (m *MockBucketFailure) WithExpectedErrs(expectedFunc objstore.IsOpFailureExpectedFunc) objstore.Bucket
Click to show internal directories.
Click to hide internal directories.