connector

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SSHCLIConnector added in v0.14.0

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

SSHCLIConnector establishes a connection to the machine API by executing SSH CLI and running `uncloudd dial-stdio` on the remote machine.

func NewSSHCLIConnector added in v0.14.0

func NewSSHCLIConnector(cfg *SSHConnectorConfig) *SSHCLIConnector

func (*SSHCLIConnector) Close added in v0.14.0

func (c *SSHCLIConnector) Close() error

func (*SSHCLIConnector) Connect added in v0.14.0

func (c *SSHCLIConnector) Connect(ctx context.Context) (*grpc.ClientConn, error)

func (*SSHCLIConnector) Dialer added in v0.14.0

func (c *SSHCLIConnector) Dialer() (proxy.ContextDialer, error)

Dialer returns a proxy dialer for establishing connections within the cluster through SSH tunnels.

type SSHConnector

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

SSHConnector establishes a connection to the machine API through an SSH tunnel to the machine.

func NewSSHConnector

func NewSSHConnector(cfg *SSHConnectorConfig) *SSHConnector

func NewSSHConnectorFromClient

func NewSSHConnectorFromClient(client *ssh.Client) *SSHConnector

func (*SSHConnector) Close

func (c *SSHConnector) Close() error

func (*SSHConnector) Connect

func (c *SSHConnector) Connect(ctx context.Context) (*grpc.ClientConn, error)

TODO: handle context cancelation.

func (*SSHConnector) Dialer added in v0.13.0

func (c *SSHConnector) Dialer() (proxy.ContextDialer, error)

Dialer returns a proxy dialer for establishing connections within the cluster through the SSH tunnel. The connector must be created with an existing SSH client or Connect must be called first.

type SSHConnectorConfig

type SSHConnectorConfig struct {
	User    string
	Host    string
	Port    int
	KeyPath string

	SockPath string
}

func (*SSHConnectorConfig) Destination added in v0.17.0

func (cfg *SSHConnectorConfig) Destination() string

Destination returns the destination string that can be passed to ssh CLI in the format [user@]host.

type TCPConnector

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

TCPConnector establishes a connection to the machine API through a direct TCP connection to an API endpoint.

func NewTCPConnector

func NewTCPConnector(apiAddr netip.AddrPort) *TCPConnector

func (*TCPConnector) Close

func (c *TCPConnector) Close() error

func (*TCPConnector) Connect

func (c *TCPConnector) Connect(_ context.Context) (*grpc.ClientConn, error)

func (*TCPConnector) Dialer added in v0.13.0

func (c *TCPConnector) Dialer() (proxy.ContextDialer, error)

type UnixConnector added in v0.15.0

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

UnixConnector establishes a connection to the machine API through a unix domain socket.

func NewUnixConnector added in v0.15.0

func NewUnixConnector(socketPath string) *UnixConnector

func (*UnixConnector) Close added in v0.15.0

func (c *UnixConnector) Close() error

func (*UnixConnector) Connect added in v0.15.0

func (c *UnixConnector) Connect(_ context.Context) (*grpc.ClientConn, error)

func (*UnixConnector) Dialer added in v0.15.0

func (c *UnixConnector) Dialer() (proxy.ContextDialer, error)

type WireGuardConnector

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

WireGuardConnector establishes a connection to the cluster API through a WireGuard tunnel to one of the cluster machines.

func NewWireGuardConnector

func NewWireGuardConnector(user *client.User, machines []config.MachineConnection) *WireGuardConnector

func (*WireGuardConnector) Close

func (c *WireGuardConnector) Close() error

func (*WireGuardConnector) Connect

func (c *WireGuardConnector) Connect(ctx context.Context) (*grpc.ClientConn, error)

TODO: handle context cancelation.

func (*WireGuardConnector) Dialer added in v0.13.0

Jump to

Keyboard shortcuts

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