New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@redpanda-data/wasm-api

Package Overview
Dependencies
Maintainers
8
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@redpanda-data/wasm-api

wasm api helps to define wasm function

  • 23.1.21
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
5
increased by66.67%
Maintainers
8
Weekly downloads
 
Created
Source

redpanda wasm-api

Redpanda coprocessing client library for nodejs

How to use?

  1. Simply include the library and create your own instance of the SimpleTransform class.
const wasmJs = const {
  SimpleTransform,
} = require("@redpanda-data/wasm-api");
const transform = new SimpleTransform();
  1. Specify what topics you want your script to consume from:
transform.subscribe(["my-topic", PolicyInjection.Stored]);
  1. And write your custom transform logic that may filter or transform records in any way you'd like.
transform.processRecord((recordBatch) => {
   return Promise.resolve(new Map(....));
});

Whats the expected output?

Use the map returned from the processRecord method to determine what output topics you'd like to produce onto. For example if the recordBatch arrived from 'my-topic' and your Map contains a single key 'Foo', the transformed recordBatch will be produced onto a materialized topic named 'my-topic.$Foo$'. Materialized topics share all topic attributes with its source topic.

FAQs

Package last updated on 14 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc