Skip to main content

Module endpoint

Module endpoint 

Source
Expand description

Endpoint resolution — map a scheme:// URL (or a bare path) to a transport Dialer, so an operator can pick the transport at runtime the same way records pick one for links.

Two layers, deliberately split so the grammar is testable without any transport compiled in:

  • parse_endpoint — pure, feature-independent. Recognizes the scheme grammar (unix:// / uds:// / serial:// / tcp://host:port, plus a bare path as unix:// shorthand) into a ParsedEndpoint. An unknown scheme is rejected here.
  • dial — builds the concrete Dialer for a parsed endpoint, under the matching transport-* feature. A scheme whose transport isn’t compiled into this binary is rejected here (distinct from “unknown scheme”).

Structs§

ParsedEndpoint
A parsed endpoint: the transport family plus its target and any transport options (currently just the serial baud).

Enums§

Scheme
The transport family an endpoint names. Always compiled (it is grammar, not a capability) — whether a given variant can actually be dialed depends on the transport-* features, enforced in dial.

Constants§

DEFAULT_SERIAL_BAUD
Default serial baud when a serial:// endpoint omits ?baud=.

Functions§

dial
Resolve an endpoint string to a boxed Dialer for the linked-in transport.
parse_endpoint
Parse an endpoint string into a ParsedEndpoint (pure; no transport needed).