temporalid

package
v1.331.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

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

View Source
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

func Bounded(id string) string

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

func BoundedSchedule(id string) string

BoundedSchedule returns a schedule ID that still fits once Temporal prefixes it to name the schedule's own workflow.

func BoundedScheduledWorkflow

func BoundedScheduledWorkflow(id string) string

BoundedScheduledWorkflow returns the workflow ID of a schedule action that still fits once Temporal appends each run's start time.

func BoundedWithSuffix

func BoundedWithSuffix(base, suffix string) string

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

func RunnerTaskQueue(runnerPath string) string

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.

Jump to

Keyboard shortcuts

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