Skip to content

Commit

Permalink
code gen for recover policy (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
duoertai authored Oct 25, 2023
1 parent 7a2fc2c commit c2b066c
Show file tree
Hide file tree
Showing 17 changed files with 878 additions and 86 deletions.
8 changes: 7 additions & 1 deletion goapi/xdbapi/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ client.go
configuration.go
docs/ApiErrorResponse.md
docs/AsyncStateConfig.md
docs/AsyncStateConfigStateFailureRecoveryInfo.md
docs/AsyncStateExecuteRequest.md
docs/AsyncStateExecuteResponse.md
docs/AsyncStateWaitUntilRequest.md
Expand All @@ -16,7 +17,7 @@ docs/CommandRequest.md
docs/CommandResults.md
docs/CommandWaitingType.md
docs/Context.md
docs/DefaultAPI.md
docs/DefaultApi.md
docs/EncodedObject.md
docs/LocalQueueCommand.md
docs/LocalQueueMessage.md
Expand All @@ -33,7 +34,9 @@ docs/ProcessStartConfig.md
docs/ProcessStatus.md
docs/PublishToLocalQueueRequest.md
docs/RetryPolicy.md
docs/StateApiType.md
docs/StateDecision.md
docs/StateFailureRecoveryPolicy.md
docs/StateMovement.md
docs/ThreadCloseDecision.md
docs/ThreadCloseType.md
Expand All @@ -46,6 +49,7 @@ go.mod
go.sum
model_api_error_response.go
model_async_state_config.go
model_async_state_config_state_failure_recovery_info.go
model_async_state_execute_request.go
model_async_state_execute_response.go
model_async_state_wait_until_request.go
Expand All @@ -70,7 +74,9 @@ model_process_start_config.go
model_process_status.go
model_publish_to_local_queue_request.go
model_retry_policy.go
model_state_api_type.go
model_state_decision.go
model_state_failure_recovery_policy.go
model_state_movement.go
model_thread_close_decision.go
model_thread_close_type.go
Expand Down
2 changes: 1 addition & 1 deletion goapi/xdbapi/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.0.1
6.6.0
19 changes: 11 additions & 8 deletions goapi/xdbapi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,21 @@ All URIs are relative to *http://localhost*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*DefaultAPI* | [**ApiV1XdbServiceProcessExecutionDescribePost**](docs/DefaultAPI.md#apiv1xdbserviceprocessexecutiondescribepost) | **Post** /api/v1/xdb/service/process-execution/describe | describe a process execution
*DefaultAPI* | [**ApiV1XdbServiceProcessExecutionPublishToLocalQueuePost**](docs/DefaultAPI.md#apiv1xdbserviceprocessexecutionpublishtolocalqueuepost) | **Post** /api/v1/xdb/service/process-execution/publish-to-local-queue | send message(s) to be consumed within a single process execution
*DefaultAPI* | [**ApiV1XdbServiceProcessExecutionStartPost**](docs/DefaultAPI.md#apiv1xdbserviceprocessexecutionstartpost) | **Post** /api/v1/xdb/service/process-execution/start | start a process execution
*DefaultAPI* | [**ApiV1XdbServiceProcessExecutionStopPost**](docs/DefaultAPI.md#apiv1xdbserviceprocessexecutionstoppost) | **Post** /api/v1/xdb/service/process-execution/stop | stop a process execution
*DefaultAPI* | [**ApiV1XdbWorkerAsyncStateExecutePost**](docs/DefaultAPI.md#apiv1xdbworkerasyncstateexecutepost) | **Post** /api/v1/xdb/worker/async-state/execute | invoking AsyncState.execute API
*DefaultAPI* | [**ApiV1XdbWorkerAsyncStateWaitUntilPost**](docs/DefaultAPI.md#apiv1xdbworkerasyncstatewaituntilpost) | **Post** /api/v1/xdb/worker/async-state/wait-until | invoking AsyncState.waitUntil API
*DefaultAPI* | [**InternalApiV1XdbNotifyImmediateTasksPost**](docs/DefaultAPI.md#internalapiv1xdbnotifyimmediatetaskspost) | **Post** /internal/api/v1/xdb/notify-immediate-tasks | for api service to tell async service that there are new immediate tasks added to the queue
*DefaultAPI* | [**InternalApiV1XdbNotifyTimerTasksPost**](docs/DefaultAPI.md#internalapiv1xdbnotifytimertaskspost) | **Post** /internal/api/v1/xdb/notify-timer-tasks | for api service to tell async service that there are new timer tasks added to the queue
*DefaultApi* | [**ApiV1XdbServiceProcessExecutionDescribePost**](docs/DefaultApi.md#apiv1xdbserviceprocessexecutiondescribepost) | **Post** /api/v1/xdb/service/process-execution/describe | describe a process execution
*DefaultApi* | [**ApiV1XdbServiceProcessExecutionPublishToLocalQueuePost**](docs/DefaultApi.md#apiv1xdbserviceprocessexecutionpublishtolocalqueuepost) | **Post** /api/v1/xdb/service/process-execution/publish-to-local-queue | send message(s) to be consumed within a single process execution
*DefaultApi* | [**ApiV1XdbServiceProcessExecutionStartPost**](docs/DefaultApi.md#apiv1xdbserviceprocessexecutionstartpost) | **Post** /api/v1/xdb/service/process-execution/start | start a process execution
*DefaultApi* | [**ApiV1XdbServiceProcessExecutionStopPost**](docs/DefaultApi.md#apiv1xdbserviceprocessexecutionstoppost) | **Post** /api/v1/xdb/service/process-execution/stop | stop a process execution
*DefaultApi* | [**ApiV1XdbWorkerAsyncStateExecutePost**](docs/DefaultApi.md#apiv1xdbworkerasyncstateexecutepost) | **Post** /api/v1/xdb/worker/async-state/execute | invoking AsyncState.execute API
*DefaultApi* | [**ApiV1XdbWorkerAsyncStateWaitUntilPost**](docs/DefaultApi.md#apiv1xdbworkerasyncstatewaituntilpost) | **Post** /api/v1/xdb/worker/async-state/wait-until | invoking AsyncState.waitUntil API
*DefaultApi* | [**InternalApiV1XdbNotifyImmediateTasksPost**](docs/DefaultApi.md#internalapiv1xdbnotifyimmediatetaskspost) | **Post** /internal/api/v1/xdb/notify-immediate-tasks | for api service to tell async service that there are new immediate tasks added to the queue
*DefaultApi* | [**InternalApiV1XdbNotifyTimerTasksPost**](docs/DefaultApi.md#internalapiv1xdbnotifytimertaskspost) | **Post** /internal/api/v1/xdb/notify-timer-tasks | for api service to tell async service that there are new timer tasks added to the queue


## Documentation For Models

- [ApiErrorResponse](docs/ApiErrorResponse.md)
- [AsyncStateConfig](docs/AsyncStateConfig.md)
- [AsyncStateConfigStateFailureRecoveryInfo](docs/AsyncStateConfigStateFailureRecoveryInfo.md)
- [AsyncStateExecuteRequest](docs/AsyncStateExecuteRequest.md)
- [AsyncStateExecuteResponse](docs/AsyncStateExecuteResponse.md)
- [AsyncStateWaitUntilRequest](docs/AsyncStateWaitUntilRequest.md)
Expand All @@ -115,7 +116,9 @@ Class | Method | HTTP request | Description
- [ProcessStatus](docs/ProcessStatus.md)
- [PublishToLocalQueueRequest](docs/PublishToLocalQueueRequest.md)
- [RetryPolicy](docs/RetryPolicy.md)
- [StateApiType](docs/StateApiType.md)
- [StateDecision](docs/StateDecision.md)
- [StateFailureRecoveryPolicy](docs/StateFailureRecoveryPolicy.md)
- [StateMovement](docs/StateMovement.md)
- [ThreadCloseDecision](docs/ThreadCloseDecision.md)
- [ThreadCloseType](docs/ThreadCloseType.md)
Expand Down
66 changes: 66 additions & 0 deletions goapi/xdbapi/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,11 @@ components:
example:
stateId: stateId
context:
recoverFromApi: null
processStartedTimestamp: 0
processExecutionId: processExecutionId
processId: processId
recoverFromStateExecutionId: recoverFromStateExecutionId
firstAttemptTimestamp: 6
attempt: 1
stateExecutionId: stateExecutionId
Expand Down Expand Up @@ -368,9 +370,11 @@ components:
commandId: commandId
stateId: stateId
context:
recoverFromApi: null
processStartedTimestamp: 0
processExecutionId: processExecutionId
processId: processId
recoverFromStateExecutionId: recoverFromStateExecutionId
firstAttemptTimestamp: 6
attempt: 1
stateExecutionId: stateExecutionId
Expand Down Expand Up @@ -466,6 +470,10 @@ components:
nextStates:
- stateConfig:
executeApiTimeoutSeconds: 6
stateFailureRecoveryInfo:
stateFailureProceedStateId: stateFailureProceedStateId
stateFailureProceedStateConfig: null
policy: null
skipWaitUntil: true
waitUntilApiRetryPolicy:
maximumAttemptsDurationSeconds: 7
Expand All @@ -486,6 +494,10 @@ components:
encoding: encoding
- stateConfig:
executeApiTimeoutSeconds: 6
stateFailureRecoveryInfo:
stateFailureProceedStateId: stateFailureProceedStateId
stateFailureProceedStateConfig: null
policy: null
skipWaitUntil: true
waitUntilApiRetryPolicy:
maximumAttemptsDurationSeconds: 7
Expand Down Expand Up @@ -537,6 +549,10 @@ components:
nextStates:
- stateConfig:
executeApiTimeoutSeconds: 6
stateFailureRecoveryInfo:
stateFailureProceedStateId: stateFailureProceedStateId
stateFailureProceedStateConfig: null
policy: null
skipWaitUntil: true
waitUntilApiRetryPolicy:
maximumAttemptsDurationSeconds: 7
Expand All @@ -557,6 +573,10 @@ components:
encoding: encoding
- stateConfig:
executeApiTimeoutSeconds: 6
stateFailureRecoveryInfo:
stateFailureProceedStateId: stateFailureProceedStateId
stateFailureProceedStateConfig: null
policy: null
skipWaitUntil: true
waitUntilApiRetryPolicy:
maximumAttemptsDurationSeconds: 7
Expand Down Expand Up @@ -613,6 +633,10 @@ components:
example:
stateConfig:
executeApiTimeoutSeconds: 6
stateFailureRecoveryInfo:
stateFailureProceedStateId: stateFailureProceedStateId
stateFailureProceedStateConfig: null
policy: null
skipWaitUntil: true
waitUntilApiRetryPolicy:
maximumAttemptsDurationSeconds: 7
Expand Down Expand Up @@ -643,9 +667,11 @@ components:
type: object
Context:
example:
recoverFromApi: null
processStartedTimestamp: 0
processExecutionId: processExecutionId
processId: processId
recoverFromStateExecutionId: recoverFromStateExecutionId
firstAttemptTimestamp: 6
attempt: 1
stateExecutionId: stateExecutionId
Expand All @@ -667,11 +693,21 @@ components:
attempt:
description: for async state API only(during backoff retry)
type: integer
recoverFromStateExecutionId:
description: "for async state API only, state id + sequence number"
type: string
recoverFromApi:
$ref: '#/components/schemas/StateApiType'
required:
- processExecutionId
- processId
- processStartedTimestamp
type: object
StateApiType:
enum:
- WAIT_UNTIL_API
- EXECUTE_API
type: string
WorkerErrorResponse:
properties:
detail:
Expand Down Expand Up @@ -710,6 +746,10 @@ components:
example:
startStateConfig:
executeApiTimeoutSeconds: 6
stateFailureRecoveryInfo:
stateFailureProceedStateId: stateFailureProceedStateId
stateFailureProceedStateConfig: null
policy: null
skipWaitUntil: true
waitUntilApiRetryPolicy:
maximumAttemptsDurationSeconds: 7
Expand Down Expand Up @@ -783,6 +823,10 @@ components:
AsyncStateConfig:
example:
executeApiTimeoutSeconds: 6
stateFailureRecoveryInfo:
stateFailureProceedStateId: stateFailureProceedStateId
stateFailureProceedStateConfig: null
policy: null
skipWaitUntil: true
waitUntilApiRetryPolicy:
maximumAttemptsDurationSeconds: 7
Expand Down Expand Up @@ -811,7 +855,14 @@ components:
$ref: '#/components/schemas/RetryPolicy'
executeApiRetryPolicy:
$ref: '#/components/schemas/RetryPolicy'
stateFailureRecoveryInfo:
$ref: '#/components/schemas/AsyncStateConfig_stateFailureRecoveryInfo'
type: object
StateFailureRecoveryPolicy:
enum:
- FAIL_PROCESS_ON_STATE_FAILURE
- PROCEED_TO_CONFIGURED_STATE
type: string
RetryPolicy:
example:
maximumAttemptsDurationSeconds: 7
Expand Down Expand Up @@ -960,3 +1011,18 @@ components:
- namespace
- processId
type: object
AsyncStateConfig_stateFailureRecoveryInfo:
example:
stateFailureProceedStateId: stateFailureProceedStateId
stateFailureProceedStateConfig: null
policy: null
properties:
policy:
$ref: '#/components/schemas/StateFailureRecoveryPolicy'
stateFailureProceedStateId:
type: string
stateFailureProceedStateConfig:
$ref: '#/components/schemas/AsyncStateConfig'
required:
- policy
type: object
Loading

0 comments on commit c2b066c

Please sign in to comment.