Fluvio SmartStreams
This crate provides types and macros for creating custom SmartStreams,
which are WebAssembly modules that may be used to modify the behavior
of Fluvio streams to consumers. The currently supported SmartStream
types are filter
s, which may describe records to keep in or discard
from a stream.
Writing SmartStreams
See the examples
directory for full examples.
Filtering
Create a new cargo project and add fluvio-smartstream
as a dependency,
along with the following Cargo.toml
changes.
[]
= "fluvio-wasm-filter"
= "0.1.0"
= ["Fluvio Contributors <team@fluvio.io>"]
= "2018"
[]
= ['cdylib']
[]
= { = "../../" }
Then, write your smartstream using #[smartstream(filter)]
on your
top-level function. Consider this the "main" function of your SmartStream.
use ;
This filter will keep only records whose contents contain the letter z
.
License
This project is licensed under the Apache license.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Fluvio by you, shall be licensed as Apache, without any additional terms or conditions.