Skip to content

Commit ab4f8a5

Browse files
authored
docs: fix markdown table format (#5153)
1 parent d891f27 commit ab4f8a5

3 files changed

Lines changed: 64 additions & 64 deletions

File tree

docs/features/idempotency.md

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -585,17 +585,17 @@ This persistence layer is built-in, and you can either use an existing DynamoDB
585585

586586
When using DynamoDB as a persistence layer, you can alter the attribute names by passing these parameters when initializing the persistence layer:
587587

588-
||Parameter |Required |Default |Description ||
588+
| Parameter | Required | Default | Description |
589589
| ------------------------ | ------------------ | ------------------------------------ | -------------------------------------------------------------------------------------------------------- |
590-
||**tableName** |:heavy_check_mark: | |Table name to store state ||
591-
||**keyAttr** | |`id` |Partition key of the table. Hashed representation of the payload (unless **sort_key_attr** is specified) ||
592-
||**expiryAttr** | |`expiration` |Unix timestamp of when record expires ||
593-
||**inProgressExpiryAttr** | |`in_progress_expiration` |Unix timestamp of when record expires while in progress (in case of the invocation times out) ||
594-
||**statusAttr** | |`status` |Stores status of the lambda execution during and after invocation ||
595-
||**dataAttr** | |`data` |Stores results of successfully executed Lambda handlers ||
596-
||**validationKeyAttr** | |`validation` |Hashed representation of the parts of the event used for validation ||
597-
||**sortKeyAttr** | | |Sort key of the table (if table is configured with a sort key). ||
598-
||**staticPkValue** | |`idempotency#{LAMBDA_FUNCTION_NAME}` |Static value to use as the partition key. Only used when **sort_key_attr** is set. ||
590+
| **tableName** | :heavy_check_mark: | | Table name to store state |
591+
| **keyAttr** | | `id` | Partition key of the table. Hashed representation of the payload (unless **sort_key_attr** is specified) |
592+
| **expiryAttr** | | `expiration` | Unix timestamp of when record expires |
593+
| **inProgressExpiryAttr** | | `in_progress_expiration` | Unix timestamp of when record expires while in progress (in case of the invocation times out) |
594+
| **statusAttr** | | `status` | Stores status of the lambda execution during and after invocation |
595+
| **dataAttr** | | `data` | Stores results of successfully executed Lambda handlers |
596+
| **validationKeyAttr** | | `validation` | Hashed representation of the parts of the event used for validation |
597+
| **sortKeyAttr** | | | Sort key of the table (if table is configured with a sort key). |
598+
| **staticPkValue** | | `idempotency#{LAMBDA_FUNCTION_NAME}` | Static value to use as the partition key. Only used when **sort_key_attr** is set. |
599599

600600
#### CachePersistenceLayer
601601

@@ -618,14 +618,14 @@ We recommend using [`@valkey/valkey-glide`](https://www.npmjs.com/package/@valke
618618

619619
When using Cache as a persistence layer, you can alter the attribute names by passing these parameters when initializing the persistence layer:
620620

621-
||Parameter |Required |Default |Description ||
622-
| ------------------------ | ------------------ | ------------------------------------ | -------------------------------------------------------------------------------------------------------- |
623-
||**client** |:heavy_check_mark: | |A connected Redis-compatible client instance ||
624-
||**expiryAttr** | |`expiration` |Unix timestamp of when record expires ||
625-
||**inProgressExpiryAttr** | |`in_progress_expiration` |Unix timestamp of when record expires while in progress (in case of the invocation times out) ||
626-
||**statusAttr** | |`status` |Stores status of the lambda execution during and after invocation ||
627-
||**dataAttr** | |`data` |Stores results of successfully executed Lambda handlers ||
628-
||**validationKeyAttr** | |`validation` |Hashed representation of the parts of the event used for validation ||
621+
| Parameter | Required | Default | Description |
622+
| ------------------------ | ------------------ | ------------------------ | --------------------------------------------------------------------------------------------- |
623+
| **client** | :heavy_check_mark: | | A connected Redis-compatible client instance |
624+
| **expiryAttr** | | `expiration` | Unix timestamp of when record expires |
625+
| **inProgressExpiryAttr** | | `in_progress_expiration` | Unix timestamp of when record expires while in progress (in case of the invocation times out) |
626+
| **statusAttr** | | `status` | Stores status of the lambda execution during and after invocation |
627+
| **dataAttr** | | `data` | Stores results of successfully executed Lambda handlers |
628+
| **validationKeyAttr** | | `validation` | Hashed representation of the parts of the event used for validation |
629629

630630
=== "Customizing CachePersistenceLayer"
631631

@@ -639,17 +639,17 @@ When using Cache as a persistence layer, you can alter the attribute names by pa
639639

640640
Idempotent decorator can be further configured with **`IdempotencyConfig`** as seen in the previous examples. These are the available options for further configuration
641641

642-
||Parameter |Default |Description ||
643-
| ----------------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
644-
||**eventKeyJmespath** |`''` |JMESPath expression to extract the idempotency key from the event record using [built-in functions](./jmespath.md#built-in-jmespath-functions){target="_blank"} ||
645-
||**payloadValidationJmespath** |`''` |JMESPath expression to validate that the specified fields haven't changed across requests for the same idempotency key _e.g., payload tampering._ ||
646-
||**jmesPathOptions** |`undefined` |Custom JMESPath functions to use when parsing the JMESPath expressions. See [Custom JMESPath Functions](idempotency.md#custom-jmespath-functions) ||
647-
||**throwOnNoIdempotencyKey** |`false` |Throw an error if no idempotency key was found in the request ||
648-
||**expiresAfterSeconds** |3600 |The number of seconds to wait before a record is expired, allowing a new transaction with the same idempotency key ||
649-
||**useLocalCache** |`false` |Whether to cache idempotency results in-memory to save on persistence storage latency and costs ||
650-
||**localCacheMaxItems** |256 |Max number of items to store in local cache ||
651-
||**hashFunction** |`md5` |Function to use for calculating hashes, as provided by the [crypto](https://nodejs.org/api/crypto.html#cryptocreatehashalgorithm-options){target="_blank"} module in the standard library. ||
652-
||**responseHook** |`undefined` |Function to use for processing the stored Idempotent response. This function hook is called when an existing idempotent response is found. See [Manipulating The Idempotent Response](idempotency.md#manipulating-the-idempotent-response) ||
642+
| Parameter | Default | Description |
643+
| ----------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
644+
| **eventKeyJmespath** | `''` | JMESPath expression to extract the idempotency key from the event record using [built-in functions](./jmespath.md#built-in-jmespath-functions){target="_blank"} |
645+
| **payloadValidationJmespath** | `''` | JMESPath expression to validate that the specified fields haven't changed across requests for the same idempotency key _e.g., payload tampering._ |
646+
| **jmesPathOptions** | `undefined` | Custom JMESPath functions to use when parsing the JMESPath expressions. See [Custom JMESPath Functions](idempotency.md#custom-jmespath-functions) |
647+
| **throwOnNoIdempotencyKey** | `false` | Throw an error if no idempotency key was found in the request |
648+
| **expiresAfterSeconds** | 3600 | The number of seconds to wait before a record is expired, allowing a new transaction with the same idempotency key |
649+
| **useLocalCache** | `false` | Whether to cache idempotency results in-memory to save on persistence storage latency and costs |
650+
| **localCacheMaxItems** | 256 | Max number of items to store in local cache |
651+
| **hashFunction** | `md5` | Function to use for calculating hashes, as provided by the [crypto](https://nodejs.org/api/crypto.html#cryptocreatehashalgorithm-options){target="_blank"} module in the standard library. |
652+
| **responseHook** | `undefined` | Function to use for processing the stored Idempotent response. This function hook is called when an existing idempotent response is found. See [Manipulating The Idempotent Response](idempotency.md#manipulating-the-idempotent-response) |
653653

654654
### Handling concurrent executions with the same payload
655655

@@ -843,11 +843,11 @@ You can optionally set a static value for the partition key using the `staticPkV
843843

844844
The example function above would cause data to be stored in DynamoDB like this:
845845

846-
||id |sort_key |expiration |status |data ||
846+
| id | sort_key | expiration | status | data |
847847
| ---------------------------- | -------------------------------- | ---------- | ----------- | ---------------------------------------------------------------- |
848-
||idempotency#MyLambdaFunction |1e956ef7da78d0cb890be999aecc0c9e |1636549553 |COMPLETED |{"paymentId": "12345, "message": "success", "statusCode": 200} ||
849-
||idempotency#MyLambdaFunction |2b2cdb5f86361e97b4383087c1ffdf27 |1636549571 |COMPLETED |{"paymentId": "527212", "message": "success", "statusCode": 200} ||
850-
||idempotency#MyLambdaFunction |f091d2527ad1c78f05d54cc3f363be80 |1636549585 |IN_PROGRESS | ||
848+
| idempotency#MyLambdaFunction | 1e956ef7da78d0cb890be999aecc0c9e | 1636549553 | COMPLETED | {"paymentId": "12345, "message": "success", "statusCode": 200} |
849+
| idempotency#MyLambdaFunction | 2b2cdb5f86361e97b4383087c1ffdf27 | 1636549571 | COMPLETED | {"paymentId": "527212", "message": "success", "statusCode": 200} |
850+
| idempotency#MyLambdaFunction | f091d2527ad1c78f05d54cc3f363be80 | 1636549585 | IN_PROGRESS | |
851851

852852
### Bring your own persistent store
853853

0 commit comments

Comments
 (0)