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 UnixToTCPBridge ¶
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).