factory

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: GPL-3.0 Imports: 9 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCache

func NewCache(config common.CacheConfig) (types.Cacher, error)

NewCache creates a new cache from a cache config

func NewDB

func NewDB(argDB ArgDB) (types.Persister, error)

NewDB creates a new database from database config

func NewStorageUnitFromConf

func NewStorageUnitFromConf(cacheConf common.CacheConfig, dbConf common.DBConfig) (*storageUnit.Unit, error)

NewStorageUnitFromConf creates a new storage unit from a storage unit config

Types

type ArgDB

type ArgDB struct {
	DBType            common.DBType
	Path              string
	BatchDelaySeconds int
	MaxBatchSize      int
	MaxOpenFiles      int
	// BloomFilterBitsPerKey == 0, the Bloom filter is disabled.
	// Otherwise, it specifies the number of bits per key used by the Bloom filter.
	BloomFilterBitsPerKey int
}

ArgDB is a structure that is used to create a new storage.Persister implementation

Jump to

Keyboard shortcuts

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