database

package
v0.43.6 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2025 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RQLiteAdapter

type RQLiteAdapter struct {
	// contains filtered or unexported fields
}

RQLiteAdapter adapts RQLite to the sql.DB interface

func NewRQLiteAdapter

func NewRQLiteAdapter(manager *RQLiteManager) (*RQLiteAdapter, error)

NewRQLiteAdapter creates a new adapter that provides sql.DB interface for RQLite

func (*RQLiteAdapter) Close

func (a *RQLiteAdapter) Close() error

Close closes the adapter connections

func (*RQLiteAdapter) GetManager

func (a *RQLiteAdapter) GetManager() *RQLiteManager

GetManager returns the underlying RQLite manager for advanced operations

func (*RQLiteAdapter) GetSQLDB

func (a *RQLiteAdapter) GetSQLDB() *sql.DB

GetSQLDB returns the sql.DB interface for compatibility with existing storage service

type RQLiteManager

type RQLiteManager struct {
	// contains filtered or unexported fields
}

RQLiteManager manages an RQLite node instance

func NewRQLiteManager

func NewRQLiteManager(cfg *config.DatabaseConfig, discoveryCfg *config.DiscoveryConfig, dataDir string, logger *zap.Logger) *RQLiteManager

NewRQLiteManager creates a new RQLite manager

func (*RQLiteManager) GetConnection

func (r *RQLiteManager) GetConnection() *gorqlite.Connection

GetConnection returns the RQLite connection

func (*RQLiteManager) Start

func (r *RQLiteManager) Start(ctx context.Context) error

Start starts the RQLite node

func (*RQLiteManager) Stop

func (r *RQLiteManager) Stop() error

Stop stops the RQLite node

Jump to

Keyboard shortcuts

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