Documentation ¶
Index ¶
- Variables
- type Entry
- type IndexStore
- func (m *IndexStore) CreateBuckets(tx *bbolt.Tx) error
- func (m *IndexStore) DeleteBlockList(tx *bbolt.Tx, p PartitionKey, list *metastorev1.BlockList) error
- func (m *IndexStore) ListPartitions(tx *bbolt.Tx) ([]*Partition, error)
- func (m *IndexStore) LoadTenantShard(tx *bbolt.Tx, p PartitionKey, tenant string, shard uint32) (*TenantShard, error)
- func (m *IndexStore) StoreBlock(tx *bbolt.Tx, shard *TenantShard, md *metastorev1.BlockMeta) error
- type Partition
- type PartitionKey
- type TenantShard
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidPartitionKey = errors.New("invalid partition key")
View Source
var (
ErrInvalidStringTable = errors.New("malformed string table")
)
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry struct { Partition PartitionKey Shard uint32 Tenant string BlockID string BlockMeta *metastorev1.BlockMeta StringTable *metadata.StringTable }
type IndexStore ¶
type IndexStore struct{}
func NewIndexStore ¶
func NewIndexStore() *IndexStore
func (*IndexStore) CreateBuckets ¶
func (m *IndexStore) CreateBuckets(tx *bbolt.Tx) error
func (*IndexStore) DeleteBlockList ¶
func (m *IndexStore) DeleteBlockList(tx *bbolt.Tx, p PartitionKey, list *metastorev1.BlockList) error
func (*IndexStore) ListPartitions ¶
func (m *IndexStore) ListPartitions(tx *bbolt.Tx) ([]*Partition, error)
func (*IndexStore) LoadTenantShard ¶
func (m *IndexStore) LoadTenantShard(tx *bbolt.Tx, p PartitionKey, tenant string, shard uint32) (*TenantShard, error)
func (*IndexStore) StoreBlock ¶
func (m *IndexStore) StoreBlock(tx *bbolt.Tx, shard *TenantShard, md *metastorev1.BlockMeta) error
type Partition ¶
type Partition struct { Key PartitionKey TenantShards map[string]map[uint32]struct{} }
func NewPartition ¶
func NewPartition(k PartitionKey) *Partition
func (*Partition) AddTenantShard ¶
type PartitionKey ¶
func NewPartitionKey ¶
func NewPartitionKey(timestamp time.Time, duration time.Duration) PartitionKey
func (PartitionKey) Bytes ¶
func (k PartitionKey) Bytes() []byte
func (PartitionKey) Equal ¶
func (k PartitionKey) Equal(x PartitionKey) bool
func (PartitionKey) MarshalBinary ¶
func (k PartitionKey) MarshalBinary() ([]byte, error)
func (PartitionKey) String ¶
func (k PartitionKey) String() string
func (*PartitionKey) UnmarshalBinary ¶
func (k *PartitionKey) UnmarshalBinary(b []byte) error
type TenantShard ¶
type TenantShard struct { Partition PartitionKey Tenant string Shard uint32 Blocks []*metastorev1.BlockMeta StringTable *metadata.StringTable }
Click to show internal directories.
Click to hide internal directories.