Motivation
Our wasm function requires knowledge of the data schema to parse JSON data.
Goals
- Support transfer of the data schema from function-stream host to wasm function
Implementation
We can employ pulsar-client-go to extract the schema in JSON format from the message.
One possible approach is to mount a specific file, say /schema, to the wasm function's wasi. We can then utilize the buffer_reader to write to this file.
When the wasm function wants to access the schema, we could transfer the schema through this file interface.
Motivation
Our wasm function requires knowledge of the data schema to parse JSON data.
Goals
Implementation
We can employ pulsar-client-go to extract the schema in JSON format from the message.
One possible approach is to mount a specific file, say /schema, to the wasm function's wasi. We can then utilize the buffer_reader to write to this file.
When the wasm function wants to access the schema, we could transfer the schema through this file interface.