config

package
v0.0.0-...-04d6450 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package config maintains global control parameters for Tatris

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	IndexLib  string     `yaml:"index_lib"`
	Directory *Directory `yaml:"directory"`
	Segment   *Segment   `yaml:"segment"`
	Wal       *Wal       `yaml:"wal"`
	Query     *Query     `yaml:"query"`
	// contains filtered or unexported fields
}
var Cfg *Config

func (*Config) GetFSPath

func (cfg *Config) GetFSPath() string

func (*Config) IsVerified

func (cfg *Config) IsVerified() bool

IsVerified checks if this config struct was verified or not

func (*Config) String

func (cfg *Config) String() string

func (*Config) Verify

func (cfg *Config) Verify()

Verify wraps doVerify with a `sync.Once`

type Directory

type Directory struct {
	Type string `yaml:"type"`
	FS   *FS    `yaml:"fs"`
	OSS  *OSS   `yaml:"oss"`
}

type FS

type FS struct {
	Path string `yaml:"path"`
}

type OSS

type OSS struct {
	Endpoint        string `yaml:"endpoint"`
	Bucket          string `yaml:"bucket"`
	AccessKeyID     string `yaml:"access_key_id"`
	SecretAccessKey string `yaml:"secret_access_key"`
	// MinimumConcurrencyLoadSize is the minimum file size to enable concurrent query.
	// When the file size to be loaded is greater than this value, oss will be queried concurrently
	MinimumConcurrencyLoadSize int `yaml:"minimum_concurrency_load_size"`
}

type Query

type Query struct {
	// the default number of hours to scan when no time range is explicitly passed in
	DefaultScanHours int `yaml:"default_scan_hours"`
	// acts on terms aggregation, increase default_aggregation_shard_size
	// to better account for these disparate doc counts and improve the accuracy
	// of the selection of top terms
	DefaultAggregationShardSize int `yaml:"default_aggregation_shard_size"`
	// The maximum number of documents that a query is allowed to hit, an errs.QueryLoadExceedError
	// will be returned if this limit is exceeded.
	DocNumLimit int64 `yaml:"doc_num_limit"`
	// The maximum number of readers allowed to load data at the same time, which is a threshold
	// used to limit the global instantaneous resource usage.
	GlobalReadersLimit int `yaml:"global_readers_limit"`
}

type Segment

type Segment struct {
	MatureThreshold int64 `yaml:"mature_threshold"`
}

type Wal

type Wal struct {
	NoSync      bool `yaml:"no_sync"`
	SegmentSize int  `yaml:"segment_size"`
	// 0: Binary; 1: JSON
	LogFormat        byte        `yaml:"log_format"`
	SegmentCacheSize int         `yaml:"segment_cache_size"`
	NoCopy           bool        `yaml:"no_copy"`
	DirPerms         os.FileMode `yaml:"dir_perms"`
	FilePerms        os.FileMode `yaml:"file_perms"`
	// the number of Goroutines used to consume WAL each time
	Parallel int `yaml:"parallel"`
}

Jump to

Keyboard shortcuts

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