Documentation
¶
Overview ¶
Package keys encodes and decodes the engine's composite flow and step keys. A key is "{shard}-{id}-{token}" with a 1-based shard: the shard routes the request, the id is the per-shard sequential row id, and the random token is an unguessable write capability. CorrelationID derives the token-free, capability-free identifier that observability sinks must use.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CorrelationID ¶
CorrelationID is the non-secret, capability-free flow identifier for telemetry (spans, logs, metrics): the flowKey with its random token segment omitted. It uniquely identifies the flow for correlation - {shard} disambiguates the per-shard sequential flow_id - but grants nothing. It is deliberately NOT a valid engine key: no operation accepts it, and the engine offers no correlationID->key lookup, so a trace/log reader cannot escalate it into the flow's write capability. Every place a flow identifier crosses into an observability sink must use this, never the token-bearing key (which belongs only on the task carrier and in-memory waiter matching).
func ParseFlowKey ¶
ParseFlowKey extracts the shard, numeric flow ID and flow token from a composite flow key. Format: "{shard}-{flowID}-{token}" with a 1-based shard.
func ParseStepKey ¶
ParseStepKey extracts the shard, numeric step ID and step token from a composite step key. Format: "{shard}-{stepID}-{token}" with a 1-based shard.
func RandomIdentifier ¶
RandomIdentifier generates a random hex string of the given byte length. It mints the unguessable token segment of flow and step keys.
Types ¶
This section is empty.