Documentation ¶
Overview ¶
Package database is a plugin that manages the badger database (e.g. garbage collection).
Index ¶
Constants ¶
View Source
const ( // CfgDatabaseDir defines the directory of the database. CfgDatabaseDir = "database.directory" // CfgDatabaseInMemory defines whether to use an in-memory database. CfgDatabaseInMemory = "database.inMemory" // CfgDatabaseDirty defines whether to override the database dirty flag. CfgDatabaseDirty = "database.dirty" )
View Source
const ( // DBVersion defines the version of the database schema this version of GoShimmer supports. // Every time there's a breaking change regarding the stored data, this version flag should be adjusted. DBVersion = 8 )
View Source
const PluginName = "Database"
PluginName is the name of the database plugin.
Variables ¶
View Source
var ( // ErrDBVersionIncompatible is returned when the database has an unexpected version. ErrDBVersionIncompatible = errors.New("database version is not compatible. please delete your database folder and restart") )
Functions ¶
func IsDatabaseUnhealthy ¶
func IsDatabaseUnhealthy() bool
IsDatabaseUnhealthy tells whether the database is unhealthy, meaning not shutdown properly.
func MarkDatabaseHealthy ¶
func MarkDatabaseHealthy()
MarkDatabaseHealthy marks the database as healthy, respectively correctly closed.
func MarkDatabaseUnhealthy ¶
func MarkDatabaseUnhealthy()
MarkDatabaseUnhealthy marks the database as not healthy, meaning that it wasn't shutdown properly.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.