Help us shape the future of Go! Take the 2026 Go Developer Survey

worker-probe

command
v1.21.20 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

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:

  1. 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.

  2. 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.

Jump to

Keyboard shortcuts

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