Skip to content

Commit 53e356a

Browse files
committed
feat: [Cadence Schedules] Add schedule API request/response types
Signed-off-by: abhishek.jha <abhishek.jha@uber.com>
1 parent 1cf01e4 commit 53e356a

File tree

3 files changed

+638
-10
lines changed

3 files changed

+638
-10
lines changed

common/types/schedule.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,13 @@ func (v *ScheduleSpec) GetJitter() (o time.Duration) {
181181
type StartWorkflowAction struct {
182182
WorkflowType *WorkflowType `json:"workflowType,omitempty"`
183183
TaskList *TaskList `json:"taskList,omitempty"`
184-
Input []byte `json:"-"`
184+
Input []byte `json:"-"` // Potential PII
185185
WorkflowIDPrefix string `json:"workflowIdPrefix,omitempty"`
186186
ExecutionStartToCloseTimeoutSeconds *int32 `json:"executionStartToCloseTimeoutSeconds,omitempty"`
187187
TaskStartToCloseTimeoutSeconds *int32 `json:"taskStartToCloseTimeoutSeconds,omitempty"`
188188
RetryPolicy *RetryPolicy `json:"retryPolicy,omitempty"`
189-
Memo *Memo `json:"-"`
190-
SearchAttributes *SearchAttributes `json:"-"`
189+
Memo *Memo `json:"-"` // Filtering PII
190+
SearchAttributes *SearchAttributes `json:"-"` // Filtering PII
191191
}
192192

193193
func (v *StartWorkflowAction) GetWorkflowType() *WorkflowType {
@@ -384,12 +384,12 @@ func (v *BackfillInfo) GetRunsTotal() (o int32) {
384384

385385
// ScheduleInfo provides runtime information about the schedule.
386386
type ScheduleInfo struct {
387-
LastRunTime time.Time `json:"lastRunTime,omitempty"`
388-
NextRunTime time.Time `json:"nextRunTime,omitempty"`
389-
TotalRuns int64 `json:"totalRuns,omitempty"`
390-
CreateTime time.Time `json:"createTime,omitempty"`
391-
LastUpdateTime time.Time `json:"lastUpdateTime,omitempty"`
392-
OngoingBackfills []BackfillInfo `json:"ongoingBackfills,omitempty"`
387+
LastRunTime time.Time `json:"lastRunTime,omitempty"`
388+
NextRunTime time.Time `json:"nextRunTime,omitempty"`
389+
TotalRuns int64 `json:"totalRuns,omitempty"`
390+
CreateTime time.Time `json:"createTime,omitempty"`
391+
LastUpdateTime time.Time `json:"lastUpdateTime,omitempty"`
392+
OngoingBackfills []*BackfillInfo `json:"ongoingBackfills,omitempty"`
393393
}
394394

395395
func (v *ScheduleInfo) GetLastRunTime() (o time.Time) {
@@ -427,7 +427,7 @@ func (v *ScheduleInfo) GetLastUpdateTime() (o time.Time) {
427427
return
428428
}
429429

430-
func (v *ScheduleInfo) GetOngoingBackfills() (o []BackfillInfo) {
430+
func (v *ScheduleInfo) GetOngoingBackfills() (o []*BackfillInfo) {
431431
if v != nil {
432432
return v.OngoingBackfills
433433
}

0 commit comments

Comments
 (0)