update
This commit is contained in:
@@ -493,8 +493,8 @@ async function smartsend(
|
|||||||
|
|
||||||
**Return Value:**
|
**Return Value:**
|
||||||
- Returns a Promise that resolves to an object containing:
|
- Returns a Promise that resolves to an object containing:
|
||||||
- `envelope` - The envelope object containing all metadata and payloads
|
- `env` - The envelope object containing all metadata and payloads
|
||||||
- `envelope_json` - JSON string representation of the envelope for publishing
|
- `env_json_str` - JSON string representation of the envelope for publishing
|
||||||
- `published` - Boolean indicating whether the message was automatically published to NATS
|
- `published` - Boolean indicating whether the message was automatically published to NATS
|
||||||
|
|
||||||
**Input Format:**
|
**Input Format:**
|
||||||
@@ -539,7 +539,7 @@ async function smartreceive(msg, options = {})
|
|||||||
3. For each payload:
|
3. For each payload:
|
||||||
- Determine transport type (`direct` or `link`)
|
- Determine transport type (`direct` or `link`)
|
||||||
- If `direct`: Base64 decode the data from the message
|
- If `direct`: Base64 decode the data from the message
|
||||||
- If `link`: Fetch data from URL using exponential backoff (via `fileserverDownloadHandler`)
|
- If `link`: Fetch data from URL using exponential backoff (via `fileserver_download_handler`)
|
||||||
- Deserialize based on payload type (`dictionary`, `table`, `binary`, etc.)
|
- Deserialize based on payload type (`dictionary`, `table`, `binary`, etc.)
|
||||||
4. Return envelope object with `payloads` field containing list of `(dataname, data, type)` tuples
|
4. Return envelope object with `payloads` field containing list of `(dataname, data, type)` tuples
|
||||||
|
|
||||||
@@ -578,9 +578,9 @@ async def smartsend(
|
|||||||
- `fileserver_upload_handler` (Callable) - Custom upload handler function
|
- `fileserver_upload_handler` (Callable) - Custom upload handler function
|
||||||
|
|
||||||
**Return Value:**
|
**Return Value:**
|
||||||
- Returns a tuple `(envelope, envelope_json)` where:
|
- Returns a tuple `(env, env_json_str)` where:
|
||||||
- `envelope` - The envelope dictionary containing all metadata and payloads
|
- `env` - The envelope dictionary containing all metadata and payloads
|
||||||
- `envelope_json` - JSON string representation of the envelope for publishing
|
- `env_json_str` - JSON string representation of the envelope for publishing
|
||||||
|
|
||||||
**Input Format:**
|
**Input Format:**
|
||||||
- `data` - **Must be a list of (dataname, data, type) tuples**: `[(dataname1, data1, "type1"), (dataname2, data2, "type2"), ...]`
|
- `data` - **Must be a list of (dataname, data, type) tuples**: `[(dataname1, data1, "type1"), (dataname2, data2, "type2"), ...]`
|
||||||
|
|||||||
Reference in New Issue
Block a user