purger

package
v1.15.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2023 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteTenantStatusResponse

type DeleteTenantStatusResponse struct {
	TenantID      string `json:"tenant_id"`
	BlocksDeleted bool   `json:"blocks_deleted"`
}

type TenantDeletionAPI

type TenantDeletionAPI struct {
	// contains filtered or unexported fields
}

func NewTenantDeletionAPI

func NewTenantDeletionAPI(storageCfg cortex_tsdb.BlocksStorageConfig, cfgProvider bucket.TenantConfigProvider, logger log.Logger, reg prometheus.Registerer) (*TenantDeletionAPI, error)

func (*TenantDeletionAPI) DeleteTenant

func (api *TenantDeletionAPI) DeleteTenant(w http.ResponseWriter, r *http.Request)

func (*TenantDeletionAPI) DeleteTenantStatus

func (api *TenantDeletionAPI) DeleteTenantStatus(w http.ResponseWriter, r *http.Request)

type TombstonesLoader

type TombstonesLoader interface {
	// GetPendingTombstones returns all pending tombstones
	GetPendingTombstones(userID string) (TombstonesSet, error)

	// GetPendingTombstonesForInterval returns all pending tombstones between two times
	GetPendingTombstonesForInterval(userID string, from, to model.Time) (TombstonesSet, error)

	// GetStoreCacheGenNumber returns store cache gen number for a user
	GetStoreCacheGenNumber(tenantIDs []string) string

	// GetResultsCacheGenNumber returns results cache gen number for a user
	GetResultsCacheGenNumber(tenantIDs []string) string
}

TombstonesLoader loads delete requests and gen numbers from store and keeps checking for updates. It keeps checking for changes in gen numbers, which also means changes in delete requests and reloads specific users delete requests.

func NewNoopTombstonesLoader

func NewNoopTombstonesLoader() TombstonesLoader

NewNoopTombstonesLoader creates a TombstonesLoader that does nothing

type TombstonesSet

type TombstonesSet interface {
	// GetDeletedIntervals returns non-overlapping, sorted  deleted intervals.
	GetDeletedIntervals(lbls labels.Labels, from, to model.Time) []model.Interval

	// Len returns number of tombstones that are there
	Len() int

	// HasTombstonesForInterval tells whether there are any tombstones which overlapping given interval
	HasTombstonesForInterval(from, to model.Time) bool
}

TombstonesSet holds all the pending delete requests for a user

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL