Documentation ¶
Index ¶
- Constants
- func NewBucketClient(ctx context.Context, cfg Config, name string, logger log.Logger) (objstore.Bucket, error)
- type BucketClientMock
- func (m *BucketClientMock) Close() error
- func (m *BucketClientMock) Delete(ctx context.Context, name string) error
- func (m *BucketClientMock) Exists(ctx context.Context, name string) (bool, error)
- func (m *BucketClientMock) Get(ctx context.Context, name string) (io.ReadCloser, error)
- func (m *BucketClientMock) GetRange(ctx context.Context, name string, off, length int64) (io.ReadCloser, error)
- func (m *BucketClientMock) IsObjNotFoundErr(err error) bool
- func (m *BucketClientMock) Iter(ctx context.Context, dir string, f func(string) error) error
- func (m *BucketClientMock) MockGet(name, content string, err error)
- func (m *BucketClientMock) MockIter(prefix string, objects []string, err error)
- func (m *BucketClientMock) Name() string
- func (m *BucketClientMock) ObjectSize(ctx context.Context, name string) (uint64, error)
- func (m *BucketClientMock) Upload(ctx context.Context, name string, r io.Reader) error
- type BucketStoreConfig
- type Config
- type DurationList
- type UserBucketClient
- func (b *UserBucketClient) Close() error
- func (b *UserBucketClient) Delete(ctx context.Context, name string) error
- func (b *UserBucketClient) Exists(ctx context.Context, name string) (bool, error)
- func (b *UserBucketClient) Get(ctx context.Context, name string) (io.ReadCloser, error)
- func (b *UserBucketClient) GetRange(ctx context.Context, name string, off, length int64) (io.ReadCloser, error)
- func (b *UserBucketClient) IsObjNotFoundErr(err error) bool
- func (b *UserBucketClient) Iter(ctx context.Context, dir string, f func(string) error) error
- func (b *UserBucketClient) Name() string
- func (b *UserBucketClient) ObjectSize(ctx context.Context, name string) (uint64, error)
- func (b *UserBucketClient) Upload(ctx context.Context, name string, r io.Reader) error
Constants ¶
const ( // BackendS3 is the value for the S3 storage backend BackendS3 = "s3" // BackendGCS is the value for the GCS storage backend BackendGCS = "gcs" // TenantIDExternalLabel is the external label set when shipping blocks to the storage TenantIDExternalLabel = "__org_id__" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BucketClientMock ¶ added in v0.6.0
BucketClientMock mocks objstore.Bucket
func (*BucketClientMock) Close ¶ added in v0.6.0
func (m *BucketClientMock) Close() error
Close mocks objstore.Bucket.Close()
func (*BucketClientMock) Delete ¶ added in v0.6.0
func (m *BucketClientMock) Delete(ctx context.Context, name string) error
Delete mocks objstore.Bucket.Delete()
func (*BucketClientMock) Get ¶ added in v0.6.0
func (m *BucketClientMock) Get(ctx context.Context, name string) (io.ReadCloser, error)
Get mocks objstore.Bucket.Get()
func (*BucketClientMock) GetRange ¶ added in v0.6.0
func (m *BucketClientMock) GetRange(ctx context.Context, name string, off, length int64) (io.ReadCloser, error)
GetRange mocks objstore.Bucket.GetRange()
func (*BucketClientMock) IsObjNotFoundErr ¶ added in v0.6.0
func (m *BucketClientMock) IsObjNotFoundErr(err error) bool
IsObjNotFoundErr mocks objstore.Bucket.IsObjNotFoundErr()
func (*BucketClientMock) MockGet ¶ added in v0.6.0
func (m *BucketClientMock) MockGet(name, content string, err error)
MockGet is a convenient method to mock Get() and Exists()
func (*BucketClientMock) MockIter ¶ added in v0.6.0
func (m *BucketClientMock) MockIter(prefix string, objects []string, err error)
MockIter is a convenient method to mock Iter()
func (*BucketClientMock) Name ¶ added in v0.6.0
func (m *BucketClientMock) Name() string
Name mocks objstore.Bucket.Name()
func (*BucketClientMock) ObjectSize ¶ added in v0.6.0
ObjectSize mocks objstore.Bucket.ObjectSize()
type BucketStoreConfig ¶ added in v0.6.0
type BucketStoreConfig struct { SyncDir string `yaml:"sync_dir"` SyncInterval time.Duration `yaml:"sync_interval"` IndexCacheSizeBytes uint64 `yaml:"index_cache_size_bytes"` MaxChunkPoolBytes uint64 `yaml:"max_chunk_pool_bytes"` MaxSampleCount uint64 `yaml:"max_sample_count"` MaxConcurrent int `yaml:"max_concurrent"` BlockSyncConcurrency int `yaml:"block_sync_concurrency"` }
BucketStoreConfig holds the config information for Bucket Stores used by the querier
func (*BucketStoreConfig) RegisterFlags ¶ added in v0.6.0
func (cfg *BucketStoreConfig) RegisterFlags(f *flag.FlagSet)
RegisterFlags registers the BucketStore flags
type Config ¶
type Config struct { Dir string `yaml:"dir"` BlockRanges DurationList `yaml:"block_ranges_period"` Retention time.Duration `yaml:"retention_period"` ShipInterval time.Duration `yaml:"ship_interval"` Backend string `yaml:"backend"` BucketStore BucketStoreConfig `yaml:"bucket_store"` // MaxTSDBOpeningConcurrencyOnStartup limits the number of concurrently opening TSDB's during startup MaxTSDBOpeningConcurrencyOnStartup int `yaml:"max_tsdb_opening_concurrency_on_startup"` // Backends S3 s3.Config `yaml:"s3"` GCS gcs.Config `yaml:"gcs"` }
Config holds the config information for TSDB storage
func (*Config) BlocksDir ¶ added in v0.6.0
BlocksDir returns the directory path where TSDB blocks and wal should be stored by the ingester
func (*Config) RegisterFlags ¶
RegisterFlags registers the TSDB flags
type DurationList ¶
DurationList is the block ranges for a tsdb
func (*DurationList) Set ¶
func (d *DurationList) Set(s string) error
Set implements the flag.Value interface
func (*DurationList) String ¶
func (d *DurationList) String() string
String implements the flag.Value interface
func (*DurationList) ToMilliseconds ¶ added in v0.6.0
func (d *DurationList) ToMilliseconds() []int64
ToMilliseconds returns the duration list in milliseconds
type UserBucketClient ¶ added in v0.6.0
type UserBucketClient struct {
// contains filtered or unexported fields
}
UserBucketClient is a wrapper around a objstore.Bucket that prepends writes with a userID
func NewUserBucketClient ¶ added in v0.6.0
func NewUserBucketClient(userID string, bucket objstore.Bucket) *UserBucketClient
NewUserBucketClient makes a new UserBucketClient.
func (*UserBucketClient) Close ¶ added in v0.6.0
func (b *UserBucketClient) Close() error
Close implements io.Closer
func (*UserBucketClient) Delete ¶ added in v0.6.0
func (b *UserBucketClient) Delete(ctx context.Context, name string) error
Delete removes the object with the given name.
func (*UserBucketClient) Exists ¶ added in v0.6.0
Exists checks if the given object exists in the bucket.
func (*UserBucketClient) Get ¶ added in v0.6.0
func (b *UserBucketClient) Get(ctx context.Context, name string) (io.ReadCloser, error)
Get returns a reader for the given object name.
func (*UserBucketClient) GetRange ¶ added in v0.6.0
func (b *UserBucketClient) GetRange(ctx context.Context, name string, off, length int64) (io.ReadCloser, error)
GetRange returns a new range reader for the given object name and range.
func (*UserBucketClient) IsObjNotFoundErr ¶ added in v0.6.0
func (b *UserBucketClient) IsObjNotFoundErr(err error) bool
IsObjNotFoundErr returns true if error means that object is not found. Relevant to Get operations.
func (*UserBucketClient) Iter ¶ added in v0.6.0
Iter calls f for each entry in the given directory (not recursive.). The argument to f is the full object name including the prefix of the inspected directory.
func (*UserBucketClient) Name ¶ added in v0.6.0
func (b *UserBucketClient) Name() string
Name returns the bucket name for the provider.
func (*UserBucketClient) ObjectSize ¶ added in v0.6.0
ObjectSize returns the size of the specified object.