update
This commit is contained in:
@@ -18,9 +18,9 @@ The system uses **handler functions** to abstract file server operations, allowi
|
||||
```julia
|
||||
# Upload handler - uploads data to file server and returns URL
|
||||
# The handler is passed to smartsend as fileserver_upload_handler parameter
|
||||
# It receives: (file_server_url::String, dataname::String, data::Vector{UInt8})
|
||||
# It receives: (fileserver_url::String, dataname::String, data::Vector{UInt8})
|
||||
# Returns: Dict{String, Any} with keys: "status", "uploadid", "fileid", "url"
|
||||
fileserver_upload_handler(file_server_url::String, dataname::String, data::Vector{UInt8})::Dict{String, Any}
|
||||
fileserver_upload_handler(fileserver_url::String, dataname::String, data::Vector{UInt8})::Dict{String, Any}
|
||||
|
||||
# Download handler - fetches data from file server URL with exponential backoff
|
||||
# The handler is passed to smartreceive as fileserver_download_handler parameter
|
||||
@@ -40,8 +40,8 @@ The system uses a **standardized list-of-tuples format** for all payload operati
|
||||
# Input format for smartsend (always a list of tuples with type info)
|
||||
[(dataname1, data1, type1), (dataname2, data2, type2), ...]
|
||||
|
||||
# Output format for smartreceive (returns a dictionary with payloads field containing list of tuples)
|
||||
# Returns: Dict with envelope metadata and payloads field containing Vector{Tuple{String, Any, String}}
|
||||
# Output format for smartreceive (returns a dictionary-like object with payloads field containing list of tuples)
|
||||
# Returns: Dict-like object with envelope metadata and payloads field containing Vector{Tuple{String, Any, String}}
|
||||
# {
|
||||
# "correlation_id": "...",
|
||||
# "msg_id": "...",
|
||||
@@ -442,7 +442,7 @@ end
|
||||
```
|
||||
|
||||
**Output Format:**
|
||||
- Returns a dictionary (key-value map) containing all envelope fields:
|
||||
- Returns a JSON object (dictionary) containing all envelope fields:
|
||||
- `correlation_id`, `msg_id`, `timestamp`, `send_to`, `msg_purpose`, `sender_name`, `sender_id`, `receiver_name`, `receiver_id`, `reply_to`, `reply_to_msg_id`, `broker_url`
|
||||
- `metadata` - Message-level metadata dictionary
|
||||
- `payloads` - List of tuples, each containing `(dataname, data, type)` with deserialized payload data
|
||||
@@ -495,7 +495,6 @@ async function smartsend(
|
||||
- Returns a Promise that resolves to an object containing:
|
||||
- `env` - The envelope object containing all metadata and payloads
|
||||
- `env_json_str` - JSON string representation of the envelope for publishing
|
||||
- `published` - Boolean indicating whether the message was automatically published to NATS
|
||||
|
||||
**Input Format:**
|
||||
- `data` - **Must be a list of (dataname, data, type) tuples**: `[(dataname1, data1, "type1"), (dataname2, data2, "type2"), ...]`
|
||||
@@ -616,7 +615,7 @@ async def smartreceive(
|
||||
- `correlation_id` (str) - Optional correlation ID for tracing
|
||||
|
||||
**Output Format:**
|
||||
- Returns a dictionary containing all envelope fields:
|
||||
- Returns a JSON object (dictionary) containing all envelope fields:
|
||||
- `correlation_id`, `msg_id`, `timestamp`, `send_to`, `msg_purpose`, `sender_name`, `sender_id`, `receiver_name`, `receiver_id`, `reply_to`, `reply_to_msg_id`, `broker_url`
|
||||
- `metadata` - Message-level metadata dictionary
|
||||
- `payloads` - List of tuples, each containing `(dataname, data, payload_type)` with deserialized payload data
|
||||
|
||||
Reference in New Issue
Block a user