ferrokinesis 0.7.0

A local AWS Kinesis mock server for testing, written in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::error::KinesisErrorResponse;
use crate::store::Store;
use serde_json::{Value, json};

pub async fn execute(store: &Store, _data: Value) -> Result<Option<Value>, KinesisErrorResponse> {
    let open_shard_count = store.sum_open_shards().await;

    tracing::trace!(open_shard_count, "limits described");
    Ok(Some(json!({
        "ShardLimit": store.options.shard_limit,
        "OpenShardCount": open_shard_count,
        "OnDemandStreamCount": 0,
        "OnDemandStreamCountLimit": 0,
    })))
}