connection

package
v2.48.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMockHttpClient

func NewMockHttpClient() (*http.Client, error)

Types

type CodespaceConnection

type CodespaceConnection struct {
	TunnelManager              *tunnels.Manager
	TunnelClient               *TunnelClient
	Options                    *tunnels.TunnelRequestOptions
	Tunnel                     *tunnels.Tunnel
	AllowedPortPrivacySettings []string
	// contains filtered or unexported fields
}

func NewCodespaceConnection

func NewCodespaceConnection(ctx context.Context, codespace *api.Codespace, httpClient *http.Client) (connection *CodespaceConnection, err error)

NewCodespaceConnection initializes a connection to a codespace. This connections allows for port forwarding which enables the use of most features of the codespace command.

func (*CodespaceConnection) Close added in v2.39.0

func (c *CodespaceConnection) Close() error

Close closes the underlying tunnel client SSH connection.

func (*CodespaceConnection) Connect added in v2.39.0

func (c *CodespaceConnection) Connect(ctx context.Context) error

Connect connects the client to the tunnel.

type TunnelClient added in v2.39.0

type TunnelClient struct {
	*tunnels.Client
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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