package mysql

import "github.com/google/trillian/storage/mysql"

Package mysql provides a MySQL-based storage layer implementation.

Index

Functions

func GetDatabase

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

GetDatabase returns an instance of MySQL database, or creates one.

TODO(pavelkalinnikov): Make the dependency of MySQL quota provider from MySQL storage provider explicit.

func NewAdminStorage

func NewAdminStorage(db *sql.DB) *mysqlAdminStorage

NewAdminStorage returns a MySQL storage.AdminStorage implementation backed by DB.

func NewLogStorage

func NewLogStorage(db *sql.DB, mf monitoring.MetricFactory) storage.LogStorage

NewLogStorage creates a storage.LogStorage instance for the specified MySQL URL. It assumes storage.AdminStorage is backed by the same MySQL database as well.

func OpenDB

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

OpenDB opens a database connection for all MySQL-based storage implementations.

Source Files

admin_storage.go errors.go log_storage.go provider.go queue.go sql.go tree_storage.go

Directories

PathSynopsis
storage/mysql/mysqlpbPackage mysqlpb contains protobuf definitions used by the mysql implementation.
Version
v1.7.1 (latest)
Published
Jan 9, 2025
Platform
linux/amd64
Imports
35 packages
Last checked
5 days ago

Tools for package owners.