SmartModule

The fluvio smartmodule family of commands is used to create and delete SmartModules, as well as to view basic information about existing SmartModules.

Create and manage SmartModules

SmartModules are compiled WASM modules used to create SmartModules.

Usage: fluvio smartmodule <COMMAND>

Commands:
  create  Create a new SmartModule with a given name
  list    List all existing SmartModules
  watch   Watch for changes to SmartModules
  delete  Delete one or more SmartModules with the given name(s)
  test    Test SmartModule

Options:
  -h, --help
          Print help (see a summary with '-h')
 

fluvio smartmodule create

This command is used to create new Fluvio SmartModules. A SmartModule must be given a name and provided with a path to a WASM binary which will be uploaded and used for the SmartModule.

Create a new SmartModule with a given name

Usage: fluvio smartmodule create [OPTIONS] --wasm-file <WASM_FILE> <NAME>

Arguments:
  <NAME>  The name of the SmartModule to create

Options:
      --wasm-file <WASM_FILE>  The path to a WASM binary to create the SmartModule from
      --package <PACKAGE>      The path to the SmartModule package (experimental)
  -h, --help                   Print help

Example usage:

$ fluvio smartmodule create json-filter --wasm-file=target/wasm32-unknown-unknown/release/json_filter.wasm

 

fluvio smartmodule list

This command shows all the registered SmartModules in your cluster.

List all existing SmartModules

Usage: fluvio smartmodule list [OPTIONS]

Options:
  -O, --output <type>    Output [default: table] [possible values: table, yaml, json]
      --filter <FILTER>  
  -h, --help             Print help

Example usage:

$ fluvio smartmodule list
 NAME          STATUS             SIZE
 json-filter   SmartModuleStatus  142843

 

fluvio smartmodule watch

Watch for changes to SmartModules

Usage: fluvio smartmodule watch [OPTIONS]

Options:
  -O, --output <type>  Output [default: table] [possible values: table, yaml, json]
  -h, --help           Print help
 

fluvio smartmodule delete

This command will delete an existing SmartModule by name.

Delete one or more SmartModules with the given name(s)

Usage: fluvio smartmodule delete [OPTIONS] <name>...

Arguments:
  <name>...  One or more name(s) of the smartmodule(s) to be deleted

Options:
  -c, --continue-on-error  Continue deleting in case of an error
  -h, --help               Print help

Example usage:

$ fluvio smartmodule delete json-filter
 

fluvio smartmodule test