database

package
v1.19.2 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorParamEmpty liberr.CodeError = iota + libcfg.MinErrorComponentDatabase
	ErrorParamInvalid
	ErrorComponentNotInitialized
	ErrorConfigInvalid
	ErrorComponentStart
	ErrorComponentReload
	ErrorDependencyLogDefault
)
View Source
const (
	ComponentType = "database"
)

Variables

This section is empty.

Functions

func DefaultConfig

func DefaultConfig(indent string) []byte

func Register

func Register(cfg libcfg.Config, key string, cpt CptDatabase)

func RegisterNew

func RegisterNew(ctx context.Context, cfg libcfg.Config, key string)

func SetDefaultConfig

func SetDefaultConfig(cfg []byte)

Types

type CptDatabase added in v1.19.0

type CptDatabase interface {
	cfgtps.Component

	SetLogOptions(ignoreRecordNotFoundError bool, slowThreshold libdur.Duration)
	GetDatabase() libdbs.Database
	SetDatabase(db libdbs.Database)
}

func Load

func Load(getCpt cfgtps.FuncCptGet, key string) CptDatabase

func New

func New(ctx context.Context) CptDatabase

Jump to

Keyboard shortcuts

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