Package mysql provides a Cloud SQL MySQL driver that uses go-sql-driver/mysql and works with database/sql
Functions
func RegisterDriver
func RegisterDriver(name string, opts ...cloudsqlconn.Option) (func() error, error)
RegisterDriver registers a MySQL driver that uses the cloudsqlconn.Dialer configured with the provided options. The choice of name is entirely up to the caller and may be used to distinguish between multiple registrations of differently configured Dialers.
LivenessCheckConn
LivenessCheckConn wraps the underlying connection with support for a liveness check.
See https://github.com/go-sql-driver/mysql/pull/934 for details.
func (*LivenessCheckConn) SyscallConn
func (c *LivenessCheckConn) SyscallConn() (syscall.RawConn, error)
SyscallConn supports a connection check in the MySQL driver by delegating to the underlying non-TLS net.Conn.