pqssh

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: MIT Imports: 6 Imported by: 1

README

go-pqssh

Documentation

Overview

Package pqssh implements a driver.Driver for PostgreSQL over SSH. This driver can connect to PostgreSQL via SSH.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connector

type Connector struct {
	// contains filtered or unexported fields
}

Connector is the pqssh connector.

func NewConnector

func NewConnector(sshClient *ssh.Client, dsn string) *Connector

NewConnector returns a new driver.Connector for the specified DSN backed by the specified SSH client.

func (*Connector) Connect

func (c *Connector) Connect(ctx context.Context) (driver.Conn, error)

func (*Connector) Driver

func (c *Connector) Driver() driver.Driver

type Dialer

type Dialer struct {
	// contains filtered or unexported fields
}

Dialer is the pqssh dialer.

func NewDialer

func NewDialer(sshClient *ssh.Client) *Dialer

NewDialer returns a new pq.Dialer backed by the specified SSH client.

func (*Dialer) Dial

func (d *Dialer) Dial(network, address string) (net.Conn, error)

func (*Dialer) DialTimeout

func (d *Dialer) DialTimeout(network, address string, timeout time.Duration) (net.Conn, error)

type Driver

type Driver struct {
	// contains filtered or unexported fields
}

Driver is the pqssh driver.

func NewDriver

func NewDriver(sshClient *ssh.Client) *Driver

NewDriver returns a new driver.Driver backed by the specified SSH client.

func (*Driver) Open

func (d *Driver) Open(name string) (driver.Conn, error)

Jump to

Keyboard shortcuts

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