tunnel

package
v2.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigHandlerName = "tunnel-config"
View Source
const CreateHandlerName = "tunnel-create"
View Source
const RunHandlerName = "tunnel-run"

Variables

This section is empty.

Functions

func NewConfigHandler

func NewConfigHandler(tunnelService TunnelConfigurator) *configHandler

func NewCreateHandler

func NewCreateHandler(tunnelService TunnelCreator) *createHandler

func NewRunHandler

func NewRunHandler(tunnelService TunnelRunner) *runHandler

Types

type ConfigInput

type ConfigInput struct {
	TunnelName string          `json:"tunnel_name"`
	TunnelUUID string          `json:"tunnel_uuid"`
	Persistent bool            `json:"persistent"`
	Ingress    *domain.Ingress `json:"ingress"`
}

type ConfigOutput

type ConfigOutput struct {
	TunnelName  string `json:"tunnel_name"`
	ConfigPath  string `json:"config_path"`
	ContentHash string `json:"content_hash"`
}

type CreateInput

type CreateInput struct {
	Name       string `json:"name"`
	Persistent bool   `json:"persistent"`
}

type CreateOutput

type CreateOutput struct {
	Name       string `json:"name"`
	Persistent bool   `json:"persistent"`
	TunnelUUID string `json:"tunnel_uuid"`
}

type RunInput

type RunInput struct {
	TunnelName  string `json:"tunnel_name"`
	ConfigPath  string `json:"config_path"`  // included for hash-based change detection
	ContentHash string `json:"content_hash"` // included for hash-based change detection
}

type RunOutput

type RunOutput struct {
	TunnelName string          `json:"tunnel_name"`
	Process    processIdentity `json:"process"`
}

type TunnelConfigurator

type TunnelConfigurator interface {
	SaveConfiguration(ctx context.Context, tunnel *domain.Tunnel, ingress *domain.Ingress) error
	DeleteConfiguration(ctx context.Context, tunnel *domain.Tunnel) error
	GetConfigurationPath(ctx context.Context, tunnel *domain.Tunnel) (string, error)
}

type TunnelCreator

type TunnelCreator interface {
	Create(ctx context.Context, tunnel *domain.Tunnel) (string, error)
	Delete(ctx context.Context, tunnel *domain.Tunnel) error
	Exists(ctx context.Context, tunnel *domain.Tunnel) (bool, error)
	GetID(ctx context.Context, tunnel *domain.Tunnel) (string, error)
}

type TunnelRunner

type TunnelRunner interface {
	Run(ctx context.Context, tunnel *domain.Tunnel) (int, error)
}

Jump to

Keyboard shortcuts

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