Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Port fs db server port. // Default: 8888 // Env: PORT Port int `yaml:"port"` // Storage fs db storage options. Storage Storage `yaml:"storage"` // WPool worker pool options. WPool WPool `yaml:"wPool"` }
Config provides fs db configuration options.
Default: port: 8888 storage: dbPath: test_db maxDirCount: 1000000 rootDirs: - ./testStorage gcPeriod: 1m wPool: numWorkers: runtime.GOMAXPROCS(0) sendDuration: 1ms
func ParseConfig ¶
ParseConfig returns filled Config options from a configuration file.
type Storage ¶
type Storage struct { // DbPath path to badger database directory. // Default: test_db // Env: DB_PATH DbPath string `yaml:"dbPath"` // MaxDirCount max number of files in one subdirectory. // Default: 1_000_000 // Env: DIR_COUNT MaxDirCount uint64 `yaml:"maxDirCount"` // RootDirs slice with root directories. // Default: ["./testStorage"] // Env: ROOT_DIRS RootDirs []string `yaml:"rootDirs"` // GCPeriod period for run the mechanism for deleting old versions of files. // Default: 1m // Env: GC_PERIOD GCPeriod time.Duration `yaml:"gcPeriod"` }
Storage provides configuration options for fs db storage.
Default: dbPath: test_db maxDirCount: 1000000 rootDirs: - ./testStorage gcPeriod: 1m
type WPool ¶ added in v1.1.0
type WPool struct { // NumWorkers the number of workers in a worker pool that can work at the same time. // Default: runtime.GOMAXPROCS(0) // Env: NUM_WORKERS NumWorkers int `yaml:"numWorkers"` // SendDuration the maximum duration of wait for an event to be sent to the worker pool. // Default: 1ms // Env: SEND_DURATION SendDuration time.Duration `yaml:"sendDuration"` }
WPool provides configuration options for a worker pool.
Default: numWorkers: runtime.GOMAXPROCS(0) sendDuration: 1ms
Click to show internal directories.
Click to hide internal directories.