Skip to content

Commit

Permalink
Implemented billing driver (#123)
Browse files Browse the repository at this point in the history
* feat: implemented queue EOF and basic billing cli

* feat: implemented billing driver and load it from cli

* chore: added cli config file example

* chore: removed stripe config as required

* feat: added config path in cli

* feat: improved metrics collection and billing cli

* chore: adjusted lint

* chore: adjusted lint
  • Loading branch information
paulobressan authored Sep 20, 2024
1 parent f9612a0 commit 12f3b2c
Show file tree
Hide file tree
Showing 19 changed files with 695 additions and 36 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
/target
.env
dev.db*
dev.billing.db*
grpcurl*
config.toml
config.billing.toml
config.daemon.toml
rpc.toml
test/.terraform*
test/local.tfstate*
Expand Down

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

202 changes: 199 additions & 3 deletions Cargo.lock

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

7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ base64 = "0.22.1"
json-patch = "2.0.0"
aws-config = { version = "1.5.5", features = ["behavior-version-latest"] }
aws-sdk-sesv2 = { version = "1.43.0", features = ["behavior-version-latest"] }
clap = { version = "4.5.17", features = ["derive", "env"] }
comfy-table = "7.1.1"
csv = "1.3.0"

[dev-dependencies]
mockall = "0.12.1"
Expand All @@ -50,5 +53,9 @@ path = "src/bin/daemon.rs"
name = "rpc"
path = "src/bin/rpc.rs"

[[bin]]
name = "cli"
path = "src/bin/cli.rs"

[lib]
path = "src/lib.rs"
4 changes: 4 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ Use the [rpc config](config/rpc.toml)
It's possible to create a toml file as config and set the file path in the env `DAEMON_CONFIG`, but it's possible to set the config using the prefix `DAEMON_`

Use the [daemon config](config/daemon.toml)

## cli

Use the [cli config](config/cli.toml)
8 changes: 8 additions & 0 deletions examples/config/cli.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
db_path="dev.billing.db"
topic="events"

[kafka_consumer]
"bootstrap.servers" = "localhost:19092"
"group.id"= "billing-stg-local-1"
"auto.offset.reset" = "earliest"
"enable.partition.eof" = true
Loading

0 comments on commit 12f3b2c

Please sign in to comment.