Documentation
¶
Overview ¶
Package database is a plugin that manages the RocksDB 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 = 38 )
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") )
View Source
var Parameters = struct { // CacheTimeProvider is a new global cache time in seconds for object storage. ForceCacheTime time.Duration `` /* 143-byte string literal not displayed */ }{}
Parameters contains configuration parameters used by the storage layer.
Functions ¶
func CacheTimeProvider ¶ added in v0.7.3
func CacheTimeProvider() *database.CacheTimeProvider
CacheTimeProvider returns the cacheTimeProvider instance
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.