database

package
v1.8.11 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorParamsEmpty liberr.CodeError = iota + libcfg.MinErrorComponentDatabase
	ErrorParamsInvalid
	ErrorComponentNotInitialized
	ErrorConfigInvalid
	ErrorStartDatabase
	ErrorReloadDatabase
	ErrorDependencyLogDefault
)
View Source
const (
	ComponentType = "database"
)

Variables

This section is empty.

Functions

func DefaultConfig

func DefaultConfig(indent string) []byte

func IsCodeError

func IsCodeError() bool

func Register

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

func RegisterNew

func RegisterNew(cfg libcfg.Config, key, logKey string)

func SetDefaultConfig

func SetDefaultConfig(cfg []byte)

Types

type ComponentDatabase

type ComponentDatabase interface {
	libcfg.Component

	SetLOGKey(logKey string)
	SetLogOptions(ignoreRecordNotFoundError bool, slowThreshold time.Duration)
	GetDatabase() libdbs.Database
	SetDatabase(db libdbs.Database)
}

func Load

func New

func New(logKey string) ComponentDatabase

Jump to

Keyboard shortcuts

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