driver

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: GPL-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const MySQL = "icingadb-mysql"
View Source
const PostgreSQL = "icingadb-pgsql"

Variables

This section is empty.

Functions

func Register

func Register(logger *logging.Logger)

Register makes our database Driver available under the name "icingadb-*sql".

Types

type Driver

type Driver struct {
	Logger *logging.Logger
	// contains filtered or unexported fields
}

Driver wraps a driver.Driver that also must implement driver.DriverContext with logging capabilities and provides our RetryConnector.

func (Driver) OpenConnector

func (d Driver) OpenConnector(name string) (driver.Connector, error)

OpenConnector implements the DriverContext interface.

type PgSQLDriver

type PgSQLDriver struct {
	pq.Driver
}

PgSQLDriver extends pq.Driver with driver.DriverContext compliance.

func (PgSQLDriver) OpenConnector

func (PgSQLDriver) OpenConnector(name string) (driver.Connector, error)

OpenConnector implements the driver.DriverContext interface.

type RetryConnector

type RetryConnector struct {
	driver.Connector
	// contains filtered or unexported fields
}

RetryConnector wraps driver.Connector with retry logic.

func (RetryConnector) Connect

func (c RetryConnector) Connect(ctx context.Context) (driver.Conn, error)

Connect implements part of the driver.Connector interface.

func (RetryConnector) Driver

func (c RetryConnector) Driver() driver.Driver

Driver implements part of the driver.Connector interface.

Jump to

Keyboard shortcuts

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