Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseDatabase ¶
type BaseDatabase struct {
// contains filtered or unexported fields
}
func (*BaseDatabase) Blob ¶
func (b *BaseDatabase) Blob() blob.BlobStore
Blob returns the underling blob store instance
func (*BaseDatabase) Close ¶
func (b *BaseDatabase) Close() error
Close cleans up the database connections
func (*BaseDatabase) Metadata ¶
func (b *BaseDatabase) Metadata() metadata.MetadataStore
Metadata returns the underlying metadata store instance
func (*BaseDatabase) Transaction ¶
func (b *BaseDatabase) Transaction(readWrite bool) *Txn
Transaction starts a new database transaction and returns a handle to it
type CommitTimestampError ¶
func (CommitTimestampError) Error ¶
func (e CommitTimestampError) Error() string
type InMemoryDatabase ¶
type InMemoryDatabase struct {
*BaseDatabase
}
InMemoryDatabase stores all data in memory. Data will not be persisted
func NewInMemory ¶
func NewInMemory(logger *slog.Logger) (*InMemoryDatabase, error)
NewInMemory creates a new in-memory database
type PersistentDatabase ¶
type PersistentDatabase struct { *BaseDatabase // contains filtered or unexported fields }
PersistentDatabase stores its data on disk, providing persistence across restarts
func NewPersistent ¶
func NewPersistent( dataDir string, logger *slog.Logger, ) (*PersistentDatabase, error)
NewPersistent creates a new persistent database instance using the provided data directory
type Txn ¶
type Txn struct {
// contains filtered or unexported fields
}
Txn is a wrapper around the transaction objects for the underlying DB engines
Click to show internal directories.
Click to hide internal directories.