tunneldriver

package
v0.0.0-...-9c4f112 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dialer

type Dialer interface {
	DialContext(context.Context, string, string) (net.Conn, error)
}

Dialer is the portion of *net.Dialer that this package uses. This is exported only for testing reasons.

type TunnelDriver

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

TunnelDriver is a driver for creating and deleting ngrok tunnels

func New

func New(ctx context.Context, logger logr.Logger, opts TunnelDriverOpts) (*TunnelDriver, error)

New creates and initializes a new TunnelDriver

func (*TunnelDriver) CreateTunnel

func (td *TunnelDriver) CreateTunnel(ctx context.Context, name string, spec ingressv1alpha1.TunnelSpec) error

CreateTunnel creates and starts a new tunnel in a goroutine. If a tunnel with the same name already exists, it will be stopped and replaced with a new tunnel unless the labels match.

func (*TunnelDriver) DeleteTunnel

func (td *TunnelDriver) DeleteTunnel(ctx context.Context, name string) error

DeleteTunnel stops and deletes a tunnel

func (*TunnelDriver) Healthy

func (td *TunnelDriver) Healthy() error

func (*TunnelDriver) Ready

func (td *TunnelDriver) Ready() error

type TunnelDriverComments

type TunnelDriverComments struct {
	Gateway string `json:"gateway,omitempty"`
}

type TunnelDriverOpts

type TunnelDriverOpts struct {
	ServerAddr string
	Region     string
	RootCAs    string
	Comments   *TunnelDriverComments
}

TunnelDriverOpts are options for creating a new TunnelDriver

Jump to

Keyboard shortcuts

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