package crdb
import "github.com/google/trillian/storage/crdb"
Package crdb provides a CockroachDB-based storage layer implementation.
Index ¶
- Constants
- func GetDatabase() (*sql.DB, error)
- func NewLogStorage(db *sql.DB, mf monitoring.MetricFactory) storage.LogStorage
- func NewSQLAdminStorage(db *sql.DB) storage.AdminStorage
- func OpenDB(dbURL string) (*sql.DB, error)
Constants ¶
const ( // StorageProviderName is the name of the storage provider. StorageProviderName = "crdb" )
Functions ¶
func GetDatabase ¶
GetDatabase returns the database handle for the provider.
func NewLogStorage ¶
func NewLogStorage(db *sql.DB, mf monitoring.MetricFactory) storage.LogStorage
NewLogStorage creates a storage.LogStorage instance for the specified CockroachDB URL. It assumes storage.AdminStorage is backed by the same CockroachDB database as well.
func NewSQLAdminStorage ¶
func NewSQLAdminStorage(db *sql.DB) storage.AdminStorage
NewSQLAdminStorage returns a SQL storage.AdminStorage implementation backed by DB. Should work for MySQL and CockroachDB
func OpenDB ¶
OpenDB opens a database connection to the specified database.
Source Files ¶
errors.go log_storage.go pg.go provider.go queue.go sql.go sqladminstorage.go tree_storage.go
- Version
- v1.7.1 (latest)
- Published
- Jan 9, 2025
- Platform
- linux/amd64
- Imports
- 30 packages
- Last checked
- 5 days ago –
Tools for package owners.