factory

package
v1.0.19 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 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
}

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