Package (v1.4.3)

Package mysql provides a Cloud SQL MySQL driver that uses go-sql-driver/mysql and works with database/sql


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.


type LivenessCheckConn struct {

LivenessCheckConn wraps the underlying connection with support for a liveness check.

See 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.