Documentation
¶
Overview ¶
Package conformance is the worker-protocol conformance suite. It drives a worker of kind "echo" through every protocol path (output, channel writes, dynamic next, usage, retryable and permanent errors, interrupt/resume, claim-checked payloads, long jobs kept alive by heartbeats).
The worker under test implements the echo contract below. By default the Go reference implementation (Echo) runs in-process; set PT_CONFORMANCE_WORKER to a command to test another SDK instead: it is started with NATS_URL and PACKTRAIL_NAMESPACE set and must serve kind "echo" until killed.
Echo contract — the job input (an object) drives the behaviour:
sleep_ms sleep this long first (exercises heartbeats)
fail_until {node: n}: that node fails retryably while attempt < n
permanent fail permanently (no retry)
interrupt node id: that node interrupts with {"ask": <node>} unless resumed
writes return as channel writes
next {node: target}: the dynamic next node of that node
usage return as usage counters
and the output is {"node", "attempt", "input", "resume"?, "item"?}.
Index ¶
Constants ¶
const Kind = "echo"
Kind is the worker kind the suite uses.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.