Documentation
¶
Overview ¶
Package peers lets one doze-aws service reach its siblings — SNS delivering to SQS queues, EventBridge dispatching to targets, Lambda destinations — without caring how the deployment is wired. A Directory answers "how do I speak HTTP to service X?" identically across the three real topologies:
- one process serving everything (the doze-aws binary, or an embedded Stack): InProcess dispatches straight into the sibling handler, no sockets involved;
- one child process per service on unix sockets (how doze runs the services): UnixSockets / FromEnv;
- services on plain TCP endpoints: FromEnv via AWS_ENDPOINT_URL_*.
Cross-service delivery is always best-effort and late-bound: a service with no directory entry for a peer logs and drops, it never fails to start.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Directory ¶
Directory resolves sibling services. ok is false when the deployment has no wiring for that service (callers degrade gracefully).
func FromEnv ¶
func FromEnv() Directory
FromEnv resolves peers from the environment at call time (late-bound, so a child process started before its peers still finds them):
DOZE_<SERVICE>_SOCKET unix socket path (doze child-process wiring) AWS_ENDPOINT_URL_<SERVICE> per-service TCP endpoint (SDK-standard variable) AWS_ENDPOINT_URL shared endpoint, e.g. a doze-aws gateway
func InProcess ¶
InProcess wires peers within a single process: requests round-trip straight into the sibling's http.Handler with no network. resolve returns nil for services that aren't running.
func None ¶
func None() Directory
None is an empty directory: every lookup misses. It is what a service sees when cross-service delivery is deliberately disabled.
func UnixSockets ¶
UnixSockets wires peers as HTTP-over-unix-socket endpoints, one socket per service — the shape doze's per-instance child processes use.