connectors

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMysqlConnector

func NewMysqlConnector(getConfigFunc GetMysqlConfigCallback, shouldReconfigureCallback ShouldReconfigureCallback) driver.Connector

NewMysqlConnector will create a new driver.Connector for a MySQL database

func NewPostgresConnector

func NewPostgresConnector(getConfigFunc GetPostgresConfigCallback, shouldReconfigureCallback ShouldReconfigureCallback) driver.Connector

NewPostgresConnector will create a new driver.Connector for PostgreSQL

Types

type GetMysqlConfigCallback

type GetMysqlConfigCallback func(ctx context.Context) (*mysql.Config, stackerr.Error)

A function signature for a callback function that gets the MySQL connection configuraiton.

type GetPostgresConfigCallback

type GetPostgresConfigCallback func(ctx context.Context) (config pgx.ConnConfig, opts []stdlib.OptionOpenDB, err stackerr.Error)

A function signature for a callback function that gets the Postgres connection configuraiton.

type ShouldReconfigureCallback

type ShouldReconfigureCallback func(ctx context.Context) (reconfigure bool, err stackerr.Error)

A function signature for a callback function that determines whether the connection configuration should be reconfigured for the next connection.

Jump to

Keyboard shortcuts

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