ssh

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	User       string
	Host       string
	Port       int
	PrivateKey []byte
}

func (*Config) DecodeFromDSN

func (conf *Config) DecodeFromDSN(encodedDSN string) (dsn string, err error)

func (*Config) EncodeWithDSN

func (conf *Config) EncodeWithDSN(base string) (string, error)

type Connector

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

func (*Connector) Close

func (c *Connector) Close() (resultErr error)

Close needs to run best effort protocol to try and close the underlying resources. In case it's unable to close the connection, we need to be able to send the combined errors to layers above.

func (*Connector) Connect

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

func (*Connector) Driver

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

type Driver

type Driver struct{}

func (*Driver) Open

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

func (*Driver) OpenConnector

func (driver *Driver) OpenConnector(name string) (driver.Connector, error)

OpenConnector creates a connector for the encoded dsn provided which contains the sshconfig

type ErrorCombiner

type ErrorCombiner []error

func (*ErrorCombiner) Combine

func (ec *ErrorCombiner) Combine(err error)

func (*ErrorCombiner) Error

func (ec *ErrorCombiner) Error() string

func (*ErrorCombiner) ErrorOrNil

func (ec *ErrorCombiner) ErrorOrNil() error

Jump to

Keyboard shortcuts

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