checkhost

package
v0.2026321.954 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: MIT Imports: 13 Imported by: 2 modules, 2 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 checkhost is the spec fabric slice for the check-verb HOST-VANTAGE resolution family (#55 CHECK-ENGINE cone Option A: relocated from sdk/kit's check_endpoint.go + vnc_bridge.go) — the kind-blind host-side machinery the `charly check` verb dispatch serves back to an out-of-process verb over CheckContextService: resolving an in-venue TCP port to a host-reachable address (container publish / ssh -L forward / local), plus the UNIX-socket→TCP bridge a TCP-only RFB client needs. These are net/ssh/exec host primitives (fabric), so they live in their OWN spec slice (Rule 2) rather than dragging os/exec into a value-types consumer; charly core inlines from here while importing zero kit, and sdk/kit re-exports the same symbols so existing kit.EndpointForVenue / kit.UnixToTCPBridge / kit.CheckEndpoint call sites are untouched.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveApkPath

func ResolveApkPath(ref, candyDir string) (string, error)

ResolveApkPath resolves a committed-APK reference against the candy's SOURCE tree. Absolute paths are used verbatim; a relative path anchors candy-dir-relative first, then each ancestor up to the candy's project / repo root (first existing match wins). This resolves a path like `tests/data/ApiDemos-debug.apk` identically whether the candy is LOCAL (candyDir under the consuming project root) or fetched via @github (candyDir under the cloned-repo cache, where a project-root-relative file lives at <repo-root>/tests/data/... several levels above candyDir).

It FAILS HARD when a relative ref has no candy dir to anchor against, or when the file is not found anywhere up the tree — the caller surfaces that, never silently passing an unresolvable path downstream.

func ResolveCommittedApk

func ResolveCommittedApk(apk, origin string, candyDirs map[string]string, candyScanErr error) (string, error)

ResolveCommittedApk resolves a relative committed-APK path (the adb/appium `apk: ./tests/data/...` fixture) against the ORIGINATING candy's source tree, given the caller's own candy-name→source-dir map (candyDirs). origin must be "candy:<key>" — the check's Origin form CollectDescriptions stamps, and <key> must match a key in candyDirs.

It FAILS HARD on every condition where the fixture cannot be anchored — a non-candy origin, an absent candyDirs entry, or a file missing under the candy tree. There is NO fallback and NO silent cwd-relative pass-through.

func UnixToTCPBridge

func UnixToTCPBridge(socketPath string) (net.Listener, error)

UnixToTCPBridge starts a TCP listener on 127.0.0.1:0 that pipes each accepted connection to the named UNIX socket. The returned listener owns a goroutine that exits when the listener is closed. Used wherever an RFB client (or any TCP-only peer) must reach a UNIX-socket-only service.

Types

type CheckEndpoint

type CheckEndpoint struct {
	Addr string
	// contains filtered or unexported fields
}

CheckEndpoint is a host-reachable TCP address for a port that lives inside the venue. The caller MUST Close() it when done (a no-op for container/shell venues; tears down the ssh -L forward for an ssh/vm venue).

func EndpointForVenue

func EndpointForVenue(desc spec.VenueDescriptor, port int) (*CheckEndpoint, error)

EndpointForVenue returns a host-reachable "ip:port" for the given in-venue TCP port, dispatched by the descriptor's generic transport word:

"container" → the host published port via `<engine> port` (host-networked → 127.0.0.1:port)
"ssh"       → an ssh -L forward into the descriptor's target (vm alias / ssh host)
"shell"/""  → 127.0.0.1:port directly (the local host venue)

Byte-equivalent to the former core resolveCheckEndpoint switch (container/host/vm) — the host projects its CheckVenue onto this descriptor once at construction; the resolution here is kind-blind.

func (*CheckEndpoint) Close

func (e *CheckEndpoint) Close()

Close tears down any ssh -L forward the endpoint opened (no-op otherwise).

Jump to

Keyboard shortcuts

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