crdb

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Overview

Package crdb provides a CockroachDB-based storage layer implementation.

Index

Constants

View Source
const (
	// StorageProviderName is the name of the storage provider.
	StorageProviderName = "crdb"
)

Variables

This section is empty.

Functions

func GetDatabase

func GetDatabase() (*sql.DB, error)

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

func OpenDB(dbURL string) (*sql.DB, error)

OpenDB opens a database connection to the specified database.

Types

This section is empty.

Jump to

Keyboard shortcuts

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