factory

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2025 License: BSD-3-Clause Imports: 5 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(config DatabaseConfig) (db.Database, error)

New creates a new database based on the config

Types

type DatabaseConfig added in v1.0.3

type DatabaseConfig struct {
	Name       string
	Dir        string
	Config     []byte
	Type       string // "leveldb", "pebbledb", "badgerdb", "memdb"
	MetricsReg prometheus.Registerer
}

DatabaseConfig contains all the parameters necessary to create a database

Jump to

Keyboard shortcuts

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