Documentation
¶
Index ¶
- func BuildIndexFileName(tableName, uploader, dbName string) string
- func CompressFile(src, dest string, sync bool) error
- func DoParallelQueries(ctx context.Context, tableQuerier TableQuerier, queries []index.Query, ...) error
- func DownloadFileFromStorage(destination string, decompressFile bool, sync bool, logger log.Logger, ...) error
- func GetUnsafeBytes(s string) []byte
- func GetUnsafeString(buf []byte) string
- func IsCompressedFile(filename string) bool
- func LoggerWithFilename(logger log.Logger, filename string) log.Logger
- func QueriesByTable(queries []index.Query) map[string][]index.Query
- func QueryKey(q index.Query) string
- func SafeOpenBoltdbFile(path string) (*bbolt.DB, error)
- func ValidateSharedStoreKeyPrefix(prefix string) error
- type GetFileFunc
- type IndexDeduper
- type IndexStorageClient
- type TableQuerier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildIndexFileName ¶
func CompressFile ¶
func DoParallelQueries ¶
func DoParallelQueries(ctx context.Context, tableQuerier TableQuerier, queries []index.Query, callback index.QueryPagesCallback) error
func DownloadFileFromStorage ¶
func DownloadFileFromStorage(destination string, decompressFile bool, sync bool, logger log.Logger, getFileFunc GetFileFunc) error
DownloadFileFromStorage downloads a file from storage to given location.
func GetUnsafeBytes ¶
func GetUnsafeString ¶
func IsCompressedFile ¶
func QueriesByTable ¶
QueriesByTable groups and returns queries by tables.
func SafeOpenBoltdbFile ¶
SafeOpenBoltdbFile will recover from a panic opening a DB file, and return the panic message in the err return object.
Types ¶
type GetFileFunc ¶
type GetFileFunc func() (io.ReadCloser, error)
type IndexDeduper ¶
type IndexDeduper struct {
// contains filtered or unexported fields
}
IndexDeduper should always be used on table level not the whole query level because it just looks at range values which can be repeated across tables Cortex anyways dedupes entries across tables
func NewIndexDeduper ¶
func NewIndexDeduper(callback index.QueryPagesCallback) *IndexDeduper
func (*IndexDeduper) Callback ¶
func (i *IndexDeduper) Callback(query index.Query, batch index.ReadBatchResult) bool
type IndexStorageClient ¶
type TableQuerier ¶
Click to show internal directories.
Click to hide internal directories.