#cloudevents #router #cerk

cerk_config_loader_file

This is a package for CERK. CERK is an open source CloudEvents Router written in Rust with a MicroKernel architecture.

5 releases

0.2.8 Jan 5, 2021
0.2.7 Jan 4, 2021
0.2.6 Dec 7, 2020
0.2.0 Nov 25, 2020
0.1.0 Nov 25, 2020

#946 in Configuration

Download history 9/week @ 2023-11-09 5/week @ 2023-11-16 9/week @ 2023-11-23 24/week @ 2023-11-30 3/week @ 2023-12-07 9/week @ 2023-12-14 14/week @ 2023-12-21 2/week @ 2023-12-28 3/week @ 2024-01-04 4/week @ 2024-01-11 12/week @ 2024-01-18 13/week @ 2024-01-25 18/week @ 2024-02-01 16/week @ 2024-02-08 56/week @ 2024-02-15 170/week @ 2024-02-22

260 downloads per month

Apache-2.0

59KB
1K SLoC

cerk_config_loader_file

Build status Crates.io Docs status

This is a package for CERK. CERK is an open source CloudEvents Router written in Rust with a MicroKernel architecture.

Introduction

CERK lets you route your CloudEvents between different different ports. Ports are transport layer bindings over which CloudEvents can be exchanged. It is built with modularity and portability in mind.

Components

CERK comes with a couple of prefabricated components, but implementing custom components is easy.

A good overview is provided on GitHub.

This Component: File Based Config Loader

This port loads configurations from a json file.

The file path could be set with the env variable CONFIG_PATH, default is ./config.json.

Example Config

{
  "routing_rules": [
    "dummy-logger-output"
  ],
  "ports": {
    "ampq-input": {
      "uri": "amqp://127.0.0.1:5672/%2f",
      "consume_channels": [
        {
          "name": "test",
          "ensure_queue": true,
          "bind_to_exchange": "test"
        }
      ],
      "publish_channels": [
        {
          "name": "test",
          "ensure_exchange": true
        }
      ]
    },
    "dummy-logger-output": null
  }
}

Examples

Update Readme

The original readme text is a Rust doc comment in the lib.rs file

  1. cargo install cargo-readme
  2. cargo readme > README.md

License

Apache-2.0

Dependencies

~8–12MB
~246K SLoC