Versions in this module Expand all Collapse all v2 v2.5.2 Apr 27, 2022 Changes in this version + const DBOperationRead + const DBOperationWrite + var ErrEmptyIndexBucketName = errors.New("empty index bucket name") + var ErrUnexistentBoltDB = errors.New("boltdb file does not exist") + var Fixtures = []testutils.Fixture + var IndexBucketName = []byte("index") + func NewTableClient(directory string) (index.TableClient, error) + func OpenBoltdbFile(path string) (*bbolt.DB, error) + type BoltDBConfig struct + Directory string + func (cfg *BoltDBConfig) RegisterFlags(f *flag.FlagSet) + type BoltIndexClient struct + func NewBoltDBIndexClient(cfg BoltDBConfig) (*BoltIndexClient, error) + func (b *BoltIndexClient) BatchWrite(ctx context.Context, batch index.WriteBatch) error + func (b *BoltIndexClient) GetDB(name string, operation int) (*bbolt.DB, error) + func (b *BoltIndexClient) NewWriteBatch() index.WriteBatch + func (b *BoltIndexClient) QueryDB(ctx context.Context, db *bbolt.DB, bucketName []byte, query index.Query, ...) error + func (b *BoltIndexClient) QueryPages(ctx context.Context, queries []index.Query, callback index.QueryPagesCallback) error + func (b *BoltIndexClient) QueryWithCursor(_ context.Context, c *bbolt.Cursor, query index.Query, ...) error + func (b *BoltIndexClient) Stop() + func (b *BoltIndexClient) WriteToDB(_ context.Context, db *bbolt.DB, bucketName []byte, writes TableWrites) error + type BoltWriteBatch struct + Writes map[string]TableWrites + func (b *BoltWriteBatch) Add(tableName, hashValue string, rangeValue []byte, value []byte) + func (b *BoltWriteBatch) Delete(tableName, hashValue string, rangeValue []byte) + type FSConfig struct + Directory string + func (cfg *FSConfig) RegisterFlags(f *flag.FlagSet) + func (cfg *FSConfig) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet) + func (cfg *FSConfig) ToCortexLocalConfig() local.Config + type FSObjectClient struct + func NewFSObjectClient(cfg FSConfig) (*FSObjectClient, error) + func (FSObjectClient) Stop() + func (f *FSObjectClient) DeleteChunksBefore(ctx context.Context, ts time.Time) error + func (f *FSObjectClient) DeleteObject(ctx context.Context, objectKey string) error + func (f *FSObjectClient) GetObject(_ context.Context, objectKey string) (io.ReadCloser, int64, error) + func (f *FSObjectClient) IsObjectNotFoundErr(err error) bool + func (f *FSObjectClient) List(ctx context.Context, prefix, delimiter string) ([]client.StorageObject, []client.StorageCommonPrefix, error) + func (f *FSObjectClient) PutObject(_ context.Context, objectKey string, object io.ReadSeeker) error + type TableClient struct + func (*TableClient) Stop() + func (c *TableClient) CreateTable(ctx context.Context, desc config.TableDesc) error + func (c *TableClient) DeleteTable(ctx context.Context, name string) error + func (c *TableClient) DescribeTable(ctx context.Context, name string) (desc config.TableDesc, isActive bool, err error) + func (c *TableClient) ListTables(ctx context.Context) ([]string, error) + func (c *TableClient) UpdateTable(ctx context.Context, current, expected config.TableDesc) error + type TableWrites struct