Expand description
AFDATA protocol adapter.
Every afhttp command emits one AFDATA protocol-v1 event per invocation:
a single-line {"kind":"result","result":...} or {"kind":"error", "error":...} JSON value followed by a newline.
Functions§
- decode_
error - decode_
result - emit
- Emit a typed result event to
writerand write it as one line of JSON followed by a newline. The command-specificcoderemains insideresult. - emit_
error - Convenience: emit an SDK-built AFDATA error event.
- emit_
error_ with - Emit an error event with caller-owned extension fields and trace.
- emit_
unredacted - Emit a payload without AFDATA redaction. Use only for commands that require an explicit reveal flag and whose payload contains no unrelated secrets.
- error_
value - Build a strict AFDATA error event for HTTP response bodies.
- result_
value - Build a strict AFDATA result event for HTTP response bodies.