Documentation
¶
Overview ¶
Package conn builds a MySQL DSN from a config.Datasource and opens a pooled *sql.DB connection. SSH tunneling is added in a later task.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DSN ¶
func DSN(ds config.Datasource) string
DSN renders a go-sql-driver/mysql DSN with tls, charset, sql_mode, timeout.
Types ¶
type Pool ¶
Pool wraps a *sql.DB for the active datasource.
func Open ¶
Open opens a pooled connection and verifies it with a Ping. When SSH is enabled, a tunnel is established first and the DSN points at the local forwarded port.
Click to show internal directories.
Click to hide internal directories.