Skip to main content

Module shared

Module shared 

Source
Expand description

Primitives shared across the Amazon SWF handlers: ARN synthesis, run-id minting, timestamps, and the type/token key derivation. Kept in one place so the register / describe / poll paths cannot diverge on wire format.

Functions§

domain_arn
Amazon SWF domain ARN, arn:aws:swf:{region}:{account}:/domain/{name}.
new_run_id
A fresh, AWS-shaped SWF run id: a base64url-ish opaque token AWS returns from StartWorkflowExecution. We mint a stable random 43-ish char id; the exact alphabet is opaque to clients, they only echo it back.
new_task_token
A fresh opaque task token (decision or activity). Clients treat it as opaque.
now_epoch
Current time as awsJson1_0 epoch-seconds (a floating-point number). SWF’s Timestamp shape carries no @timestampFormat, so awsJson1_0’s default epoch-seconds applies (SWF returns e.g. 1420070400.123).
split_type_key
Split a type_key back into (name, version).
type_key
Internal storage key for an activity or workflow type: name + a unit separator + version. The separator can never appear in a Smithy Name or Version value, so the key round-trips unambiguously.