config

package
v3.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

package bloomshipperconfig resides in its own package to prevent circular imports with storage package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlocksCacheConfig

type BlocksCacheConfig struct {
	SoftLimit flagext.Bytes `yaml:"soft_limit"`
	HardLimit flagext.Bytes `yaml:"hard_limit"`
	TTL       time.Duration `yaml:"ttl"`

	// PurgeInterval tell how often should we remove keys that are expired.
	// by default it takes `defaultPurgeInterval`
	PurgeInterval time.Duration `yaml:"-"`
}

BlocksCacheConfig represents in-process embedded cache config.

func (*BlocksCacheConfig) RegisterFlagsWithPrefix

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

func (*BlocksCacheConfig) RegisterFlagsWithPrefixAndDefaults

func (cfg *BlocksCacheConfig) RegisterFlagsWithPrefixAndDefaults(prefix, description string, f *flag.FlagSet, defaultTTL time.Duration)

func (*BlocksCacheConfig) Validate

func (cfg *BlocksCacheConfig) Validate() error

type Config

type Config struct {
	WorkingDirectory    flagext.StringSliceCSV    `yaml:"working_directory"`
	MaxQueryPageSize    flagext.Bytes             `yaml:"max_query_page_size"`
	DownloadParallelism int                       `yaml:"download_parallelism"`
	BlocksCache         BlocksCacheConfig         `yaml:"blocks_cache"`
	MetasCache          cache.Config              `yaml:"metas_cache"`
	MetasLRUCache       cache.EmbeddedCacheConfig `yaml:"metas_lru_cache"`
	MemoryManagement    MemoryManagementConfig    `yaml:"memory_management" doc:"hidden"`

	// This will always be set to true when flags are registered.
	// In unit tests, you can set this to false as a literal.
	// In integration tests, you can override this via the flag.
	CacheListOps bool `yaml:"-"`
}

func (*Config) RegisterFlagsWithPrefix

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

func (*Config) Validate

func (c *Config) Validate() error

type MemoryManagementConfig added in v3.2.0

type MemoryManagementConfig struct {
	BloomPageAllocationType string                          `yaml:"bloom_page_alloc_type"`
	BloomPageMemPoolBuckets lokiflagext.CSV[mempool.Bucket] `yaml:"bloom_page_mem_pool_buckets"`
}

func (*MemoryManagementConfig) RegisterFlagsWithPrefix added in v3.2.0

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

func (*MemoryManagementConfig) Validate added in v3.2.0

func (cfg *MemoryManagementConfig) Validate() error

Jump to

Keyboard shortcuts

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