Documentation
¶
Overview ¶
Package inmem contains the in-memory implementation of the dax interfaces.
Index ¶
- type VersionStore
- func (s *VersionStore) AddFields(ctx context.Context, qtid dax.QualifiedTableID, fields ...dax.VersionedField) error
- func (s *VersionStore) AddPartitions(ctx context.Context, qtid dax.QualifiedTableID, ...) error
- func (s *VersionStore) AddShards(ctx context.Context, qtid dax.QualifiedTableID, shards ...dax.VersionedShard) error
- func (s *VersionStore) AddTable(ctx context.Context, qtid dax.QualifiedTableID) error
- func (s *VersionStore) Copy(ctx context.Context) (dax.VersionStore, error)
- func (s *VersionStore) FieldTables(ctx context.Context, qual dax.TableQualifier) (dax.TableIDs, error)
- func (s *VersionStore) FieldVersion(ctx context.Context, qtid dax.QualifiedTableID, field dax.FieldName) (int, bool, error)
- func (s *VersionStore) Fields(ctx context.Context, qtid dax.QualifiedTableID) (dax.VersionedFields, bool, error)
- func (s *VersionStore) PartitionTables(ctx context.Context, qual dax.TableQualifier) (dax.TableIDs, error)
- func (s *VersionStore) PartitionVersion(ctx context.Context, qtid dax.QualifiedTableID, partitionNum dax.PartitionNum) (int, bool, error)
- func (s *VersionStore) Partitions(ctx context.Context, qtid dax.QualifiedTableID) (dax.VersionedPartitions, bool, error)
- func (s *VersionStore) RemoveTable(ctx context.Context, qtid dax.QualifiedTableID) (dax.VersionedShards, dax.VersionedPartitions, error)
- func (s *VersionStore) ShardTables(ctx context.Context, qual dax.TableQualifier) (dax.TableIDs, error)
- func (s *VersionStore) ShardVersion(ctx context.Context, qtid dax.QualifiedTableID, shardNum dax.ShardNum) (int, bool, error)
- func (s *VersionStore) Shards(ctx context.Context, qtid dax.QualifiedTableID) (dax.VersionedShards, bool, error)
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 ¶
func (s *VersionStore) Copy(ctx context.Context) (dax.VersionStore, error)
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 ¶
func (s *VersionStore) Fields(ctx context.Context, qtid dax.QualifiedTableID) (dax.VersionedFields, bool, error)
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 ¶
func (s *VersionStore) Partitions(ctx context.Context, qtid dax.QualifiedTableID) (dax.VersionedPartitions, bool, error)
Partitions returns the list of partitions available for the give table. It returns false if the table does not exist.
func (*VersionStore) RemoveTable ¶
func (s *VersionStore) RemoveTable(ctx context.Context, qtid dax.QualifiedTableID) (dax.VersionedShards, dax.VersionedPartitions, error)
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 ¶
func (s *VersionStore) Shards(ctx context.Context, qtid dax.QualifiedTableID) (dax.VersionedShards, bool, error)
Shards returns the list of shards available for the give table. It returns false if the table does not exist.