cfg

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultMaxSize = 4 * (1 << 30)

DefaultMaxSize is the default mmap size and therefore the maximum allowed size of the database. The size can be increased by updating the DB.MaxSize and reopening the database. This setting mainly affects virtual space usage.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {

	// The maximum allowed database size. Required by mmap.
	MaxSize int64

	// Set before calling db.Open()
	FsyncEnabled bool

	// for mmap correctness testing.
	DoAllocZero bool

	// CheckpointEveryDur if zero means checkpoint after every write.
	// Otherwise, wait and checkpoint at the next write that happens
	// after CheckpointEveryDur since the previous.
	CheckpointEveryDur time.Duration

	// Maximum size of a single WAL segment.
	// May exceed by one page if last page is a bitmap header + bitmap.
	MaxWALSegmentFileSize int
}

Config defines externally configurable rbf options. The separate package avoids circular import.

func NewDefaultConfig

func NewDefaultConfig() *Config

func (*Config) DefineFlags

func (cfg *Config) DefineFlags(flags *pflag.FlagSet)

Jump to

Keyboard shortcuts

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