connector

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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
}

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