Documentation
¶
Overview ¶
Package tunneld is a thin, stable façade over stable/alpha versioned packages.
The package is split into three pieces:
- tunneld (this package) — thin façade exposing New, Version, and aliases for the caller-facing types. Stable surface for application code.
- github.com/tunnel-pizza/tunneld/v1 — the stable Builder[T] interface and Result type, plus the Err* sentinels and *Env constants. Application code normally reaches these through the aliases here; import v1 directly to implement the interface or to reach a symbol the façade doesn't re-export.
- github.com/tunnel-pizza/tunneld/v1alpha1 — the current implementation. Internals (BuilderImpl, helpers) may change between alpha revisions; pin only if you need direct access to the struct.
New[T]() returns a Builder[T] you configure with With* methods and finalize with Build().
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Version ¶
func Version() string
Version reports the tunneld release this build links against — e.g. "v0.0.5". It matches the git tag, so a consumer can log or report the exact library version it compiles against.
Resolution, in order: the release stamp (set only in a build that passes the ldflag); the module version recorded in the importer's build info (the common consumer case — the version required in their go.mod, following a replace directive if one redirects it); the main-module version; and finally the short VCS revision of a local build, with a -dirty suffix for an uncommitted tree. A build carrying no version information at all returns "unknown", never the empty string — Version always self-identifies.
Types ¶
type BuilderV1 ¶
BuilderV1 is the builder returned by New: an alias for v1.Builder[T], re-exported so callers can name the type without importing v1. The V1 suffix versions the root name — when a v2 contract lands, BuilderV2 can sit beside this one in the same façade and callers migrate type by type instead of all at once. Alias, not a defined type: the two spellings are the same type, so a v1.Builder[T] from anywhere satisfies a BuilderV1[T] and back.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package e2e builds each example binary and runs it, asserting it exits 0 and prints what that example demonstrates.
|
Package e2e builds each example binary and runs it, asserting it exits 0 and prints what that example demonstrates. |
|
examples
|
|
|
basic
command
Command basic is the smallest tunneld example: build a value through the generic builder and print the result.
|
Command basic is the smallest tunneld example: build a value through the generic builder and print the result. |
|
named
command
Command named shows the builder with a typed payload: a struct value carried through WithValue and rendered from the Result.
|
Command named shows the builder with a typed payload: a struct value carried through WithValue and rendered from the Result. |
|
Package v1 is the stable public surface for tunneld.
|
Package v1 is the stable public surface for tunneld. |
|
Package v1alpha1 is the current implementation behind the v1.Builder interface.
|
Package v1alpha1 is the current implementation behind the v1.Builder interface. |