Documentation
¶
Index ¶
Constants ¶
View Source
const WorkflowComponent = "dapr"
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Execution ¶
type Execution struct {
ExecutionSummary
Input *string `json:"input,omitempty"`
Output *string `json:"output,omitempty"`
CustomStatus string `json:"customStatus,omitempty"`
ReplayCount int `json:"replayCount"`
FailureDetails *FailureDetails `json:"failureDetails,omitempty"`
History []HistoryEvent `json:"history"`
}
func DecodeExecution ¶
func DecodeExecution(appID, instanceID string, history []*protos.HistoryEvent, customStatus string) Execution
DecodeExecution builds a full Execution from an instance's history events.
type ExecutionSummary ¶
type ExecutionSummary struct {
AppID string `json:"appId"`
InstanceID string `json:"instanceId"`
Name string `json:"name"`
Status Status `json:"status"`
ParentInstanceID string `json:"parentInstanceId,omitempty"` // non-empty ⇒ this is a child workflow
CreatedAt *time.Time `json:"createdAt,omitempty"`
LastUpdatedAt *time.Time `json:"lastUpdatedAt,omitempty"`
}
type FailureDetails ¶
type HistoryEvent ¶
type HistoryEvent struct {
SequenceID int32 `json:"sequenceId"`
Timestamp time.Time `json:"timestamp"`
Type string `json:"type"`
Name string `json:"name,omitempty"`
InstanceID string `json:"instanceId,omitempty"` // child instance id for SubOrchestrationCreated
ScheduledID *int32 `json:"scheduledId,omitempty"` // start event's EventId; set on completion/fired events
Input *string `json:"input,omitempty"`
Output *string `json:"output,omitempty"`
FailureDetails *FailureDetails `json:"failureDetails,omitempty"` // set on TaskFailed / SubOrchestrationFailed / ExecutionFailed
}
type ListResult ¶
type ListResult struct {
Items []ExecutionSummary `json:"items"`
NextToken string `json:"nextToken,omitempty"`
}
ListResult is one page of executions plus the cursor for the next page.
Limitations of the underlying key-cursor paging:
- Items are sorted by CreatedAt (newest first) within this page only; the store pages by key order, so there is no global CreatedAt order across pages.
- A page may hold fewer than the requested pageSize items — down to zero when a filtered scan hits its per-request cap — while NextToken is still non-empty. Clients must keep paging until NextToken is empty rather than treating a short or empty page as the end.
type Mechanism ¶
type Mechanism string
func SelectMechanism ¶
SelectMechanism chooses the removal path for one workflow (spec §7).
type RemoveResult ¶
type RemoveTarget ¶
type Remover ¶
type Remover struct {
// contains filtered or unexported fields
}
func NewRemover ¶
func (*Remover) Remove ¶
func (r *Remover) Remove(ctx context.Context, t RemoveTarget, force bool) RemoveResult
func (*Remover) RemoveMany ¶
func (r *Remover) RemoveMany(ctx context.Context, targets []RemoveTarget, force bool) []RemoveResult
type Service ¶
type Service interface {
List(ctx context.Context, q ListQuery) (ListResult, error)
Stats(ctx context.Context, q ListQuery) (StatsResult, error)
Get(ctx context.Context, appID, instanceID string) (Execution, error)
// AppIDs returns every distinct app-id that has workflow data in the store,
// independent of any list filter — the source of truth for the app filter.
AppIDs(ctx context.Context) ([]string, error)
}
func NewUnreachableService ¶
NewUnreachableService builds a Service whose List/Stats/Get all fail with a store-specific ErrStoreUnreachable error.
type StatsResult ¶
type Status ¶
type Status string
func NormalizeStatus ¶
NormalizeStatus maps a durabletask ORCHESTRATION_STATUS_* string onto the six dashboard statuses. Unknown / not-yet-started values map to Pending.
func (Status) IsTerminal ¶
IsTerminal reports whether a status is final (no further events expected).
Click to show internal directories.
Click to hide internal directories.