Documentation
¶
Index ¶
- func CHASMToSchedulerMigrationState(scheduler *schedulerpb.SchedulerState, generator *schedulerpb.GeneratorState, ...) *schedulerpb.SchedulerMigrationState
- func LegacyToCreateFromMigrationStateRequest(schedule *schedulepb.Schedule, info *schedulepb.ScheduleInfo, ...) *schedulerpb.CreateFromMigrationStateRequest
- func SchedulerMigrationStateToLegacyStartScheduleArgs(migrationState *schedulerpb.SchedulerMigrationState, migrationTime time.Time) *schedulespb.StartScheduleArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CHASMToSchedulerMigrationState ¶
func CHASMToSchedulerMigrationState( scheduler *schedulerpb.SchedulerState, generator *schedulerpb.GeneratorState, invoker *schedulerpb.InvokerState, backfillers map[string]*schedulerpb.BackfillerState, lastCompletionResult *schedulerpb.LastCompletionResult, searchAttributes map[string]*commonpb.Payload, memo map[string]*commonpb.Payload, ) *schedulerpb.SchedulerMigrationState
func LegacyToCreateFromMigrationStateRequest ¶
func LegacyToCreateFromMigrationStateRequest( schedule *schedulepb.Schedule, info *schedulepb.ScheduleInfo, state *schedulespb.InternalState, searchAttributes *commonpb.SearchAttributes, memo *commonpb.Memo, migrationTime time.Time, ) *schedulerpb.CreateFromMigrationStateRequest
LegacyToCreateFromMigrationStateRequest converts legacy (workflow-backed) scheduler state to a CreateFromMigrationStateRequest proto. This is the primary V1-to-V2 migration function.
The migrationTime parameter is used for initializing timestamps that don't have a direct mapping from V1 state (e.g., StartTime for running workflows).
State preserved during migration:
- Schedule spec, action, policies, and state
- ScheduleInfo metadata (action counts, create/update times)
- ConflictToken (for optimistic concurrency control)
- Buffered starts (with V2-specific fields like RequestId, WorkflowId populated)
- Running workflows (converted to BufferedStarts with RunId/StartTime set)
- Recent actions (converted to BufferedStarts with Completed field set)
- Ongoing backfills (converted to Backfiller components)
- Last completion result and continued failure
- High water mark (becomes Generator.LastProcessedTime)
- Search attributes and memo
Note: In V2, RunningWorkflows and RecentActions are computed on-demand from BufferedStarts by the Invoker, rather than being stored separately in ScheduleInfo.
func SchedulerMigrationStateToLegacyStartScheduleArgs ¶
func SchedulerMigrationStateToLegacyStartScheduleArgs( migrationState *schedulerpb.SchedulerMigrationState, migrationTime time.Time, ) *schedulespb.StartScheduleArgs
SchedulerMigrationStateToLegacyStartScheduleArgs converts migration state to V1 StartScheduleArgs.. The migrationTime parameter is used to initialize missing timestamps.
Types ¶
This section is empty.