Documentation ¶
Index ¶
Constants ¶
View Source
const ( ConfigDB = "config" SettingsCol = "settings" ShardCol = "shards" ChunkCol = "chunks" CollectionCol = "collections" HashedShard = "hashed" RangedShard = "ranged" )
Variables ¶
This section is empty.
Functions ¶
func GetBalancerStatusByUrl ¶
get balancer status from config server
func GetColShardType ¶
input given namespace, return all keys and shard type(range or hashed)
func TestSharding ¶
Types ¶
type ChunkRange ¶
type ChunkRange struct { // the minimum/maximum of the chunk range of multiple columns shard key has multiple values Mins []interface{} Maxs []interface{} }
type DBChunkMap ¶
type DBChunkMap map[string]*ShardCollection
type ShardCollection ¶
type ShardCollection struct { Chunks []*ChunkRange // shard key may have multiple columns, for example {a:1, b:1, c:1} Keys []string ShardType string }
type ShardingChunkMap ¶
type ShardingChunkMap map[string]map[string]*ShardCollection
{replset: {namespace: []ChunkRange} }
func GetChunkMapByUrl ¶
func GetChunkMapByUrl(csUrl string) (ShardingChunkMap, error)
Click to show internal directories.
Click to hide internal directories.