10 releases (5 breaking)

0.6.0 Dec 9, 2024
0.5.3 Nov 21, 2024
0.5.1 Oct 29, 2024
0.4.1 Jul 23, 2024
0.1.0 Sep 15, 2021

#626 in Database interfaces

Download history 19/week @ 2024-09-12 1/week @ 2024-09-19 9/week @ 2024-09-26 7/week @ 2024-10-03 1/week @ 2024-10-10 100/week @ 2024-10-24 148/week @ 2024-10-31 3/week @ 2024-11-07 1/week @ 2024-11-14 157/week @ 2024-11-21 12/week @ 2024-11-28 160/week @ 2024-12-05 60/week @ 2024-12-12 1/week @ 2024-12-19

225 downloads per month

Apache-2.0

1MB
23K SLoC

This library allows the creation of custom shotover transforms.

There are two consumers of this library:

Custom Transforms

To create a custom transform you need to implement these traits:

  • transforms::TransformConfig - Defines what configuration fields the transform has in the topology.yaml.
  • transforms::TransformBuilder - Defines how to build the Transform for a new incoming connection. Only one instance is created over shotovers runtime.
  • transforms::Transform - Defines the transformation logic of the transform. A new instance is created per incoming connection.

Simple transforms can implement all of these onto a single struct but generally you need seperate structs for each.

The shotover binary

All custom transforms the user wants to use are statically compiled into a single binary. The crate for this binary is very simple, it just consists of a main.rs like:

shotover::import_transform!(transform_crate::TransformConfig);

fn main() {
    shotover::runner::Shotover::new().run_block();
}

Dependencies

~32–50MB
~1M SLoC