Documentation
¶
Overview ¶
Package temporalid keeps the Temporal IDs Credimi and credimi-runner build within the server's length limit. Both sides must build an ID the same way, so they share this package.
Index ¶
Constants ¶
const MaxLength = 255
MaxLength is the longest workflow, schedule or update ID Temporal accepts (limit.maxIDLength on the Credimi deployments).
Variables ¶
This section is empty.
Functions ¶
func Bounded ¶
Bounded returns a workflow or update ID that fits in MaxLength. An id that fits is returned unchanged; a longer id is cut and ends in "-" and the first hashLength hex digits of the sha256 of the whole id. The result depends only on id, so workflow code may call it: replays and retries rebuild the same ID, and IDs that fit keep the value they always had. The hash covers the whole id, so ids that differ only past the cut, such as by their run or attempt suffix, stay different.
func BoundedSchedule ¶
BoundedSchedule returns a schedule ID that still fits once Temporal prefixes it to name the schedule's own workflow.
func BoundedScheduledWorkflow ¶
BoundedScheduledWorkflow returns the workflow ID of a schedule action that still fits once Temporal appends each run's start time.
func BoundedWithSuffix ¶
BoundedWithSuffix returns base+suffix within MaxLength, keeping suffix: callers that strip the suffix from a child workflow ID to find its parent still can. It is base+suffix whenever that fits; otherwise only base is shortened, so the stripped ID is no longer the parent's own ID, which happens only when the parent ID was too long to take the suffix.
func RunnerTaskQueue ¶
RunnerTaskQueue returns the task queue of the mobile runner at runnerPath (the canonified "<organization>/<runner>" path, without a leading slash). Credimi schedules runner activities on it and credimi-runner polls it, so both build it here.
Types ¶
This section is empty.