tunnel

package
v0.0.68 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package tunnel provides a simple interface to start a tunnel to a backend URL.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartTunnel

func StartTunnel(ctx context.Context, backendURL string, opts ...Option) (string, error)

StartTunnel starts a tunnel to the backend URL.

Types

type Option

type Option func(*config)

Option is a tunnel option.

func WithNgrokOptions

func WithNgrokOptions(opts ...ngrok.ConnectOption) Option

WithNgrokOptions sets the ngrok options to use when using the ngrok provider.

func WithProvider

func WithProvider(provider Provider) Option

WithProvider sets the provider to use.

type Provider

type Provider uint8

Provider is a tunnel provider.

const (
	// Moe is the moe provider: https://github.com/fasmide/remotemoe
	Moe Provider = iota + 1
	// Ngrok is the ngrok provider: https://ngrok.com/
	Ngrok
)

func (Provider) String

func (i Provider) String() string

Directories

Path Synopsis
Package internal provides the internal tunnel implementation.
Package internal provides the internal tunnel implementation.
Package moe provides a tunnel that uses the Moe protocol.
Package moe provides a tunnel that uses the Moe protocol.
Package ngrok provides a tunnel that uses ngrok to expose a local port to the internet.
Package ngrok provides a tunnel that uses ngrok to expose a local port to the internet.
Package types provides common types to avoid circular dependencies.
Package types provides common types to avoid circular dependencies.

Jump to

Keyboard shortcuts

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