mysql

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: 32 Imported by: 18

Documentation

Overview

Package mysql provides a MySQL-based storage layer implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDatabase added in v1.3.4

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.

Types

This section is empty.

Directories

Path Synopsis
Package mysqlpb contains protobuf definitions used by the mysql implementation.
Package mysqlpb contains protobuf definitions used by the mysql implementation.

Jump to

Keyboard shortcuts

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