inmem

package
v3.26.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package inmem contains the in-memory implementation of the dax interfaces.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VersionStore

type VersionStore struct {
	// contains filtered or unexported fields
}

VersionStore manages all version info for shard, table keys, and field keys.

func NewVersionStore

func NewVersionStore() *VersionStore

NewVersionStore returns a new instance of VersionStore with default values.

func (*VersionStore) AddFields

func (s *VersionStore) AddFields(ctx context.Context, qtid dax.QualifiedTableID, fields ...dax.VersionedField) error

AddFields adds new fields to be managed by VersionStore. It returns the number of fields added or an error.

func (*VersionStore) AddPartitions

func (s *VersionStore) AddPartitions(ctx context.Context, qtid dax.QualifiedTableID, partitions ...dax.VersionedPartition) error

AddPartitions adds new partitions to be managed by VersionStore. It returns the number of partitions added or an error.

func (*VersionStore) AddShards

func (s *VersionStore) AddShards(ctx context.Context, qtid dax.QualifiedTableID, shards ...dax.VersionedShard) error

AddShards adds new shards to be managed by VersionStore. It returns the number of shards added or an error.

func (*VersionStore) AddTable

func (s *VersionStore) AddTable(ctx context.Context, qtid dax.QualifiedTableID) error

AddTable adds a table to be managed by VersionStore.

func (*VersionStore) Copy

Copy returns a new copy of VersionStore.

func (*VersionStore) FieldTables

func (s *VersionStore) FieldTables(ctx context.Context, qual dax.TableQualifier) (dax.TableIDs, error)

func (*VersionStore) FieldVersion

func (s *VersionStore) FieldVersion(ctx context.Context, qtid dax.QualifiedTableID, field dax.FieldName) (int, bool, error)

FieldVersion return the current version for the given table/field. If a version is not being tracked, it returns a bool value of false.

func (*VersionStore) Fields

Fields returns the list of fields available for the give table. It returns false if the table does not exist.

func (*VersionStore) PartitionTables

func (s *VersionStore) PartitionTables(ctx context.Context, qual dax.TableQualifier) (dax.TableIDs, error)

func (*VersionStore) PartitionVersion

func (s *VersionStore) PartitionVersion(ctx context.Context, qtid dax.QualifiedTableID, partitionNum dax.PartitionNum) (int, bool, error)

PartitionVersion return the current version for the given table/partitionNum. If a version is not being tracked, it returns a bool value of false.

func (*VersionStore) Partitions

Partitions returns the list of partitions available for the give table. It returns false if the table does not exist.

func (*VersionStore) RemoveTable

RemoveTable removes the given table. An error will be returned if the table does not exist.

func (*VersionStore) ShardTables

func (s *VersionStore) ShardTables(ctx context.Context, qual dax.TableQualifier) (dax.TableIDs, error)

func (*VersionStore) ShardVersion

func (s *VersionStore) ShardVersion(ctx context.Context, qtid dax.QualifiedTableID, shardNum dax.ShardNum) (int, bool, error)

ShardVersion return the current version for the given table/shardNum. If a version is not being tracked, it returns a bool value of false.

func (*VersionStore) Shards

Shards returns the list of shards available for the give table. It returns false if the table does not exist.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL