client

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tunnel

type Tunnel struct {
	// The tunnel ID to connect to
	ID string
	// The unhashed auth token
	AuthToken string
	// The host of the server the tunnel is connected to
	Host string
	// The port of the server the tunnel is connected to
	Port int
	// contains filtered or unexported fields
}

func NewTunnel

func NewTunnel(id, authToken, host string, port int) *Tunnel

Create a tunnel from retrieved data

func (*Tunnel) Close

func (t *Tunnel) Close()

Close the tunnel

func (*Tunnel) Connect

func (t *Tunnel) Connect() error

type TunnelRequest

type TunnelRequest struct {
	AuthToken string `json:"auth_token"`
	ID        string `json:"id"`
	ExpiresAt string `json:"expires_at"`
}

func RequestTunnel

func RequestTunnel() (TunnelRequest, error)

Request a new tunnel to the API

Jump to

Keyboard shortcuts

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