config

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: AGPL-3.0 Imports: 5 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"`

	// This will always be set to true when flags are registered.
	// In tests, where config is created as literal, it can be set manually.
	CacheListOps bool `yaml:"-"`
}

func (*Config) RegisterFlagsWithPrefix

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

func (*Config) Validate

func (c *Config) Validate() error

Jump to

Keyboard shortcuts

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