connector

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2025 License: Apache-2.0 Imports: 15 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.

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)

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.

Jump to

Keyboard shortcuts

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