Versions in this module Expand all Collapse all v0 v0.16.3 Nov 29, 2024 Changes in this version + func DestinationsString(destinations []Destination) string + func EvenShardsKeyRange(i, n int) (*topodatapb.KeyRange, error) + func GetShardForKeyspaceID(allShards []*topodatapb.ShardReference, keyspaceID []byte) (string, error) + func IsKeyRange(kr string) bool + func KeyRangeAdd(first, second *topodatapb.KeyRange) (*topodatapb.KeyRange, bool) + func KeyRangeContains(kr *topodatapb.KeyRange, id []byte) bool + func KeyRangeEndEqual(left, right *topodatapb.KeyRange) bool + func KeyRangeEqual(left, right *topodatapb.KeyRange) bool + func KeyRangeIncludes(big, small *topodatapb.KeyRange) bool + func KeyRangeIsPartial(kr *topodatapb.KeyRange) bool + func KeyRangeStartEqual(left, right *topodatapb.KeyRange) bool + func KeyRangeString(k *topodatapb.KeyRange) string + func KeyRangesIntersect(first, second *topodatapb.KeyRange) bool + func KeyRangesOverlap(first, second *topodatapb.KeyRange) (*topodatapb.KeyRange, error) + func ParseKeyRangeParts(start, end string) (*topodatapb.KeyRange, error) + func ParseKeyspaceIDType(param string) (topodatapb.KeyspaceIdType, error) + func ParseShardingSpec(spec string) ([]*topodatapb.KeyRange, error) + type Destination interface + IsUnique func() bool + Resolve func([]*topodatapb.ShardReference, func(shard string) error) error + String func() string + type DestinationAllShards struct + func (d DestinationAllShards) IsUnique() bool + func (d DestinationAllShards) Resolve(allShards []*topodatapb.ShardReference, addShard func(shard string) error) error + func (d DestinationAllShards) String() string + type DestinationAnyShard struct + func (d DestinationAnyShard) IsUnique() bool + func (d DestinationAnyShard) Resolve(allShards []*topodatapb.ShardReference, addShard func(shard string) error) error + func (d DestinationAnyShard) String() string + type DestinationAnyShardPicker interface + PickShard func(shardCount int) int + var AnyShardPicker DestinationAnyShardPicker = DestinationAnyShardPickerRandomShard{} + type DestinationAnyShardPickerRandomShard struct + func (dp DestinationAnyShardPickerRandomShard) PickShard(shardCount int) int + type DestinationExactKeyRange struct + KeyRange *topodatapb.KeyRange + func (d DestinationExactKeyRange) IsUnique() bool + func (d DestinationExactKeyRange) Resolve(allShards []*topodatapb.ShardReference, addShard func(shard string) error) error + func (d DestinationExactKeyRange) String() string + type DestinationExactKeyRanges []*topodatapb.KeyRange + func (d DestinationExactKeyRanges) IsUnique() bool + func (d DestinationExactKeyRanges) Resolve(allShards []*topodatapb.ShardReference, addShard func(shard string) error) error + func (d DestinationExactKeyRanges) String() string + type DestinationKeyRange struct + KeyRange *topodatapb.KeyRange + func (d DestinationKeyRange) IsUnique() bool + func (d DestinationKeyRange) Resolve(allShards []*topodatapb.ShardReference, addShard func(shard string) error) error + func (d DestinationKeyRange) String() string + type DestinationKeyRanges []*topodatapb.KeyRange + func (d DestinationKeyRanges) IsUnique() bool + func (d DestinationKeyRanges) Resolve(allShards []*topodatapb.ShardReference, addShard func(shard string) error) error + func (d DestinationKeyRanges) String() string + type DestinationKeyspaceID []byte + func (d DestinationKeyspaceID) IsUnique() bool + func (d DestinationKeyspaceID) Resolve(allShards []*topodatapb.ShardReference, addShard func(shard string) error) error + func (d DestinationKeyspaceID) String() string + type DestinationKeyspaceIDs [][]byte + func (d DestinationKeyspaceIDs) IsUnique() bool + func (d DestinationKeyspaceIDs) Resolve(allShards []*topodatapb.ShardReference, addShard func(shard string) error) error + func (d DestinationKeyspaceIDs) String() string + type DestinationNone struct + func (d DestinationNone) IsUnique() bool + func (d DestinationNone) Resolve(allShards []*topodatapb.ShardReference, addShard func(shard string) error) error + func (d DestinationNone) String() string + type DestinationShard string + func (d DestinationShard) IsUnique() bool + func (d DestinationShard) Resolve(allShards []*topodatapb.ShardReference, addShard func(shard string) error) error + func (d DestinationShard) String() string + type DestinationShards []string + func (d DestinationShards) IsUnique() bool + func (d DestinationShards) Resolve(allShards []*topodatapb.ShardReference, addShard func(shard string) error) error + func (d DestinationShards) String() string + type Uint64Key uint64 + func (i Uint64Key) Bytes() []byte + func (i Uint64Key) String() string