piloramaconfig

package
v0.42.9 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PermDefault is a default permission bits for metabase file.
	PermDefault = 0o660
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config config.Config

Config is a wrapper over the config section which provides access to Metabase configurations.

func From

func From(c *config.Config) *Config

From wraps config section into Config.

func (*Config) MaxBatchDelay

func (x *Config) MaxBatchDelay() time.Duration

MaxBatchDelay returns the value of "max_batch_delay" config parameter.

Returns 0 if the value is not a positive number.

func (*Config) MaxBatchSize

func (x *Config) MaxBatchSize() int

MaxBatchSize returns the value of "max_batch_size" config parameter.

Returns 0 if the value is not a positive number.

func (*Config) NoSync

func (x *Config) NoSync() bool

NoSync returns the value of "no_sync" config parameter as a bool value.

Returns false if the value is not a boolean.

func (*Config) Path

func (x *Config) Path() string

Path returns the value of "path" config parameter.

Returns empty string if missing, for compatibility with older configurations.

func (*Config) Perm

func (x *Config) Perm() fs.FileMode

Perm returns the value of "perm" config parameter as a fs.FileMode.

Returns PermDefault if the value is not a positive number.

Jump to

Keyboard shortcuts

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