Documentation
¶
Overview ¶
Command worker-probe is a stub TMI worker. It exists to prove the worker bootstrap + job-envelope + secret-mount contract end to end before #347's real workers depend on it. It is a test fixture, not production code.
NATS approach: this binary uses the plain github.com/nats-io/nats.go client directly rather than internal/worker.Connect or internal/worker.RunConsumer for two reasons:
internal/worker.Connect unconditionally creates a JetStream Object Store bucket (TMI_PAYLOADS), which requires JetStream to be enabled on the server. For a one-shot probe that receives a single message this extra dependency is inappropriate.
internal/worker.RunConsumer is a long-running durable JetStream consumer loop; there is no internal/worker primitive for "receive exactly one message with a timeout." The probe requires exactly that pattern.
The probe does use worker.ResultSubject (an existing helper) to derive the result subject — no new exported helpers were added to internal/worker.