tunnel

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package tunnel provides tunnel orchestration functionality.

Index

Constants

View Source
const (
	HandlerTunnelCreate = "tunnel-create"
	HandlerTunnelConfig = "tunnel-config"
	HandlerTunnelRun    = "tunnel-run"
	HandlerDNSRecord    = "dns-record"
)

Handler name constants used for DAG dependency wiring.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigHandler added in v2.4.0

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

func (*ConfigHandler) Check added in v2.4.0

func (h *ConfigHandler) Check(ctx context.Context, output ConfigOutput) (framework.Status, error)

func (*ConfigHandler) Create added in v2.4.0

func (h *ConfigHandler) Create(ctx context.Context, input ConfigInput) (ConfigOutput, error)

func (*ConfigHandler) Destroy added in v2.4.0

func (h *ConfigHandler) Destroy(ctx context.Context, output ConfigOutput) error

func (*ConfigHandler) Key added in v2.4.0

func (h *ConfigHandler) Key(input ConfigInput) string

func (*ConfigHandler) Name added in v2.4.0

func (h *ConfigHandler) Name() string

func (*ConfigHandler) Recover added in v2.4.0

type ConfigInput added in v2.4.0

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

func (ConfigInput) Tunnel added in v2.4.0

func (i ConfigInput) Tunnel() *domain.Tunnel

type ConfigOutput added in v2.4.0

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

type CreateHandler added in v2.4.0

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

func (*CreateHandler) Check added in v2.4.0

func (h *CreateHandler) Check(ctx context.Context, output CreateOutput) (framework.Status, error)

func (*CreateHandler) Create added in v2.4.0

func (h *CreateHandler) Create(ctx context.Context, input CreateInput) (CreateOutput, error)

func (*CreateHandler) Destroy added in v2.4.0

func (h *CreateHandler) Destroy(ctx context.Context, output CreateOutput) error

func (*CreateHandler) Key added in v2.4.0

func (h *CreateHandler) Key(input CreateInput) string

func (*CreateHandler) Name added in v2.4.0

func (h *CreateHandler) Name() string

func (*CreateHandler) Recover added in v2.4.0

type CreateInput added in v2.4.0

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

func (CreateInput) Tunnel added in v2.4.0

func (i CreateInput) Tunnel() *domain.Tunnel

type CreateOutput added in v2.4.0

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

func (CreateOutput) Tunnel added in v2.4.0

func (o CreateOutput) Tunnel() *domain.Tunnel

type ProcessIdentity added in v2.4.0

type ProcessIdentity struct {
	PID     int    `json:"pid"`
	Command string `json:"command"`
}

ProcessIdentity tracks a process by both PID and command name to detect PID reuse.

type RecordHandler added in v2.4.0

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

func (*RecordHandler) Check added in v2.4.0

func (h *RecordHandler) Check(ctx context.Context, output RecordOutput) (framework.Status, error)

func (*RecordHandler) Create added in v2.4.0

func (h *RecordHandler) Create(ctx context.Context, input RecordInput) (RecordOutput, error)

func (*RecordHandler) Destroy added in v2.4.0

func (h *RecordHandler) Destroy(ctx context.Context, output RecordOutput) error

func (*RecordHandler) Key added in v2.4.0

func (h *RecordHandler) Key(input RecordInput) string

func (*RecordHandler) Name added in v2.4.0

func (h *RecordHandler) Name() string

func (*RecordHandler) Recover added in v2.4.0

type RecordInput added in v2.4.0

type RecordInput struct {
	Zone       string `json:"zone"`
	Subdomain  string `json:"subdomain"`
	TunnelName string `json:"tunnel_name"`
	TunnelUUID string `json:"tunnel_uuid"` // included for hash-based change detection
	Persistent bool   `json:"persistent"`
}

func (RecordInput) Tunnel added in v2.4.0

func (i RecordInput) Tunnel() *domain.Tunnel

type RecordOutput added in v2.4.0

type RecordOutput struct {
	Zone       string `json:"zone"`
	Subdomain  string `json:"subdomain"`
	Persistent bool   `json:"persistent"`
	TunnelName string `json:"tunnel_name"`
}

func (RecordOutput) Tunnel added in v2.4.0

func (o RecordOutput) Tunnel() *domain.Tunnel

type RunHandler added in v2.4.0

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

func (*RunHandler) Check added in v2.4.0

func (h *RunHandler) Check(ctx context.Context, output RunOutput) (framework.Status, error)

func (*RunHandler) Create added in v2.4.0

func (h *RunHandler) Create(ctx context.Context, input RunInput) (RunOutput, error)

func (*RunHandler) Destroy added in v2.4.0

func (h *RunHandler) Destroy(ctx context.Context, output RunOutput) error

func (*RunHandler) Key added in v2.4.0

func (h *RunHandler) Key(input RunInput) string

func (*RunHandler) Name added in v2.4.0

func (h *RunHandler) Name() string

func (*RunHandler) Recover added in v2.4.0

func (h *RunHandler) Recover(ctx context.Context, input RunInput) (RunOutput, framework.Status, error)

type RunInput added in v2.4.0

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 added in v2.4.0

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

type Service

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

func NewService

func NewService(tunnel *domain.Tunnel, ingress *domain.Ingress, dnsService ports.DNSService, tunnelService ports.TunnelService) *Service

func (*Service) Start

func (s *Service) Start(ctx context.Context) error

func (*Service) Stop

func (s *Service) Stop(ctx context.Context) error

Jump to

Keyboard shortcuts

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