tunneltype

package
v0.41.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: MIT Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package tunneltype names what a peer carries over its tunnel.

The hub serves HTTP and HTTPS today: both are an http.Handler on the peer, HTTPS meaning the payload is TLS end to end (the peer runs a TLS server inside the tunnel and the hub dials it with a matching client config), so it stays encrypted even where the outer hop is terminated at a proxy.

TCP and TLS name raw byte streams. The hub does not carry them yet; they exist here so a peer asking for one is refused by name rather than attaching and failing later in a way nobody can read.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Type

type Type string

Type is what travels through a tunnel.

const (
	// HTTP is an http.Handler on the peer, plaintext inside the tunnel.
	HTTP Type = "http"
	// HTTPS is the same, with the payload encrypted end to end.
	HTTPS Type = "https"
	// TCP is a raw byte stream. Reserved: not carried yet.
	TCP Type = "tcp"
	// TLS is a raw byte stream carrying TLS. Reserved: not carried yet.
	TLS Type = "tls"
)

func FromProto

func FromProto(t holtv1.TunnelType) Type

FromProto reads the wire enum. A peer older than the field sends UNSPECIFIED, which is HTTP: that is all any of them could carry.

func (Type) Carried

func (t Type) Carried() bool

Carried reports whether the hub can serve this type today. It is what the attach path checks, so an unsupported tunnel is refused at the handshake with a reason the operator can read.

func (Type) Proto

func (t Type) Proto() holtv1.TunnelType

Proto converts to the wire enum.

func (Type) String

func (t Type) String() string

String is the value that reaches a metric label and the Admin API. It is always one of the constants above, never peer-supplied text: a label a peer could invent is a cardinality bomb.

Jump to

Keyboard shortcuts

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