blockcleaner

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockRemovalContext

type BlockRemovalContext struct {
	Shard    uint32
	Tenant   string
	ExpiryTs int64
}

type Config

type Config struct {
	CompactedBlocksCleanupInterval time.Duration `yaml:"compacted_blocks_cleanup_interval"`
	CompactedBlocksCleanupDelay    time.Duration `yaml:"compacted_blocks_cleanup_delay"`
}

func (*Config) RegisterFlagsWithPrefix

func (cfg *Config) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet)

type DeletionMarkers

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

func NewDeletionMarkers

func NewDeletionMarkers(db *bbolt.DB, cfg *Config, logger log.Logger, reg prometheus.Registerer) *DeletionMarkers

func (*DeletionMarkers) FindExpiredMarkers

func (m *DeletionMarkers) FindExpiredMarkers(now int64) map[string]*BlockRemovalContext

func (*DeletionMarkers) IsMarked

func (m *DeletionMarkers) IsMarked(blockId string) bool

func (*DeletionMarkers) Load

func (m *DeletionMarkers) Load()

func (*DeletionMarkers) Mark

func (m *DeletionMarkers) Mark(shard uint32, tenant string, blockId string, deletedTs int64) error

func (*DeletionMarkers) Reload

func (m *DeletionMarkers) Reload(db *bbolt.DB)

func (*DeletionMarkers) Remove

func (m *DeletionMarkers) Remove(markers map[string]*BlockRemovalContext) error

Jump to

Keyboard shortcuts

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