mysqldrv

package module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

View Source
const DialName = "ssh+tcp"

Variables

This section is empty.

Functions

This section is empty.

Types

type Dialer added in v0.2.0

type Dialer interface {
	Connect() error
	DialContext(ctx context.Context, network, address string) (net.Conn, error)
	Close() error
}

Dialer is interface type for SSH Dialer.

type Driver

type Driver struct {
	Dialer
}

Driver is driver.Driver and pq.Dialer for MySQL via SSH.

func New

func New(d Dialer) *Driver

New returns new Driver instance.

func (*Driver) DialContext

func (d *Driver) DialContext(ctx context.Context, address string) (net.Conn, error)

DialContext makes socket connection via SSH (compayible mysql/RegisterDialContext type).

func (*Driver) RegisterDial

func (d *Driver) RegisterDial(name string)

Register makes a dial available by name "mysql+ssh".

Jump to

Keyboard shortcuts

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