conformance

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
const Kind = "echo"

Kind is the worker kind the suite uses.

Variables

This section is empty.

Functions

func Echo

func Echo(ctx context.Context, j *worker.Job) (*worker.Result, error)

Echo is the Go reference implementation of the echo contract.

Types

This section is empty.

Jump to

Keyboard shortcuts

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