prometheus/tsdb/index
Bryan Boreham 1aaabfee2d tsdb: make sharding function a parameter
Instead of relying on `labels.Hash()`, which may change, have the
caller pass in a shard function if required.

For most purposes `tsdb.Options.ShardFunc` is used, but the compactor
may be created independently so `NewLeveledCompactorWithChunkSize` also
takes a shard function parameter.

Regular Prometheus, which does not use block sharding, will have this
parameter as nil.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-01-12 11:41:22 +00:00
..
index.go tsdb: make sharding function a parameter 2023-01-12 11:41:22 +00:00
index_test.go tsdb: make sharding function a parameter 2023-01-12 11:41:22 +00:00
postings.go Fix linter errors after linter update 2023-01-08 17:10:18 +01:00
postings_test.go Merge remote-tracking branch 'upstream/main' into main 2023-01-08 14:55:44 +01:00
postingsstats.go Format Go source files using 'gofumpt -w -s -extra' 2021-11-02 19:52:34 +01:00
postingsstats_test.go Format Go source files using 'gofumpt -w -s -extra' 2021-11-02 19:52:34 +01:00