Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New( name string, dbPath string, readOnly bool, config []byte, gatherer interface{}, logger log.Logger, metricsPrefix string, meterDBRegName string, ) (database.Database, error)
New creates a new database with the provided configuration
func NewFromConfig ¶ added in v1.0.3
func NewFromConfig(cfg DatabaseConfig) (database.Database, error)
NewFromConfig creates a new database from a DatabaseConfig
Types ¶
type DatabaseConfig ¶ added in v1.0.3
type DatabaseConfig struct {
Type string
Dir string
Name string
ReadOnly bool
Config []byte
MetricsReg prometheus.Registerer
Logger log.Logger
MetricsPrefix string
MeterDBRegName string
}
DatabaseConfig is a convenience struct for database configuration
Click to show internal directories.
Click to hide internal directories.