Skip to content

Commit

Permalink
Allow for custom transforms via using shotover as a crate (#1101)
Browse files Browse the repository at this point in the history
  • Loading branch information
rukai authored Apr 10, 2023
1 parent 323ff45 commit ca140f1
Show file tree
Hide file tree
Showing 14 changed files with 1,601 additions and 4 deletions.
15 changes: 15 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ members = [
"shotover-proxy",
"test-helpers",
"tokio-bin-process",
"custom-transforms-example",
]

# https://deterministic.space/high-performance-rust.html
Expand Down Expand Up @@ -46,3 +47,5 @@ hex-literal = "0.3.3"
rand = "0.8.4"
rand_distr = "0.4.1"
clap = { version = "4.0.4", features = ["cargo", "derive"] }
async-trait = "0.1.30"
typetag = "0.2.5"
22 changes: 22 additions & 0 deletions custom-transforms-example/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[package]
name = "custom-transforms-example"
version = "0.0.1"
authors = ["Ben <ben@instaclustr.com>"]
edition = "2021"
license = "Apache-2.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
shotover = { path = "../shotover" }
anyhow.workspace = true
serde.workspace = true
async-trait.workspace = true
tracing.workspace = true
typetag.workspace = true


[dev-dependencies]
test-helpers = {path = "../test-helpers"}
tokio.workspace = true
redis.workspace = true
3 changes: 3 additions & 0 deletions custom-transforms-example/config/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
main_log_level: "info,shotover_proxy=info"
observability_interface: "0.0.0.0:9001"
9 changes: 9 additions & 0 deletions custom-transforms-example/config/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: "3.3"
services:
redis-one:
image: library/redis:5.0.9
ports:
- "1111:6379"
volumes:
- ./redis.conf:/usr/local/etc/redis/redis.conf
command: ["redis-server", "/usr/local/etc/redis/redis.conf"]
Loading

0 comments on commit ca140f1

Please sign in to comment.