Skip to content

Commit fa267fb

Browse files
committed
renaming svix-agent to svix-webhook-bridge
1 parent fe9d808 commit fa267fb

File tree

28 files changed

+103
-100
lines changed

28 files changed

+103
-100
lines changed

webhook-bridge/Cargo.lock

Lines changed: 21 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webhook-bridge/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[workspace]
22
members = [
33
"generic-queue",
4-
"svix-agent-types",
5-
"svix-agent",
6-
"svix-agent-plugin-generic",
7-
"svix-agent-plugin-webhook-receiver",
4+
"svix-webhook-bridge-types",
5+
"svix-webhook-bridge",
6+
"svix-webhook-bridge-plugin-queue-consumer",
7+
"svix-webhook-bridge-plugin-webhook-receiver",
88
]

webhook-bridge/Dockerfile

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,28 +23,28 @@ WORKDIR /app
2323
COPY Cargo.toml .
2424
COPY Cargo.lock .
2525
COPY generic-queue/Cargo.toml generic-queue/
26-
COPY svix-agent-types/Cargo.toml svix-agent-types/
27-
COPY svix-agent-plugin-generic/Cargo.toml svix-agent-plugin-generic/
28-
COPY svix-agent-plugin-webhook-receiver/Cargo.toml svix-agent-plugin-webhook-receiver/
29-
COPY svix-agent/Cargo.toml svix-agent/
26+
COPY svix-webhook-bridge-types/Cargo.toml svix-webhook-bridge-types/
27+
COPY svix-webhook-bridge-plugin-queue-consumer/Cargo.toml svix-webhook-bridge-plugin-queue-consumer/
28+
COPY svix-webhook-bridge-plugin-webhook-receiver/Cargo.toml svix-webhook-bridge-plugin-webhook-receiver/
29+
COPY svix-webhook-bridge/Cargo.toml svix-webhook-bridge/
3030
RUN set -ex ;\
3131
mkdir generic-queue/src ;\
32-
mkdir svix-agent-plugin-generic/src ;\
33-
mkdir svix-agent-plugin-webhook-receiver/src ;\
34-
mkdir svix-agent-types/src ;\
35-
mkdir svix-agent/src ;\
32+
mkdir svix-webhook-bridge-plugin-queue-consumer/src ;\
33+
mkdir svix-webhook-bridge-plugin-webhook-receiver/src ;\
34+
mkdir svix-webhook-bridge-types/src ;\
35+
mkdir svix-webhook-bridge/src ;\
3636
echo '' > generic-queue/src/lib.rs ;\
37-
echo '' > svix-agent-plugin-generic/src/lib.rs ;\
38-
echo '' > svix-agent-plugin-webhook-receiver/src/lib.rs ;\
39-
echo '' > svix-agent-types/src/lib.rs ;\
40-
echo 'fn main() { println!("Dummy!"); }' > svix-agent/src/main.rs ;\
37+
echo '' > svix-webhook-bridge-plugin-queue-consumer/src/lib.rs ;\
38+
echo '' > svix-webhook-bridge-plugin-webhook-receiver/src/lib.rs ;\
39+
echo '' > svix-webhook-bridge-types/src/lib.rs ;\
40+
echo 'fn main() { println!("Dummy!"); }' > svix-webhook-bridge/src/main.rs ;\
4141
cargo build --release ;\
4242
rm -rf \
4343
generic-queue/src \
44-
svix-agent-plugin-generic/src \
45-
svix-agent-plugin-webhook-receiver/src \
46-
svix-agent-types/src \
47-
svix-agent/src
44+
svix-webhook-bridge-plugin-queue-consumer/src \
45+
svix-webhook-bridge-plugin-webhook-receiver/src \
46+
svix-webhook-bridge-types/src \
47+
svix-webhook-bridge/src
4848

4949
COPY . .
5050
# touching the lib.rs/main.rs ensures cargo rebuilds them instead of considering them already built.
@@ -68,7 +68,8 @@ RUN apt-get update ;\
6868

6969
USER appuser
7070

71-
COPY --from=build /app/target/release/svix-agent /usr/local/bin/svix-agent
71+
COPY --from=build /app/target/release/svix-webhook-bridge /usr/local/bin/svix-webhook-bridge
7272

73-
# Will fail if there's no `svix-agent.yaml` in the CWD or `SVIX_AGENT_CFG` is not set to a valid path to a config
74-
CMD ["svix-agent"]
73+
# Will fail if there's no `svix-webhook-bridge.yaml` in the CWD or `SVIX_WEBHOOK_BRIDGE_CFG` is not set to a valid
74+
# path to a config.
75+
CMD ["svix-webhook-bridge"]

webhook-bridge/README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
# Svix Agent
1+
# Svix Webhook Bridge
22

33
This service subscribes to a queue or stream and forwards each item to Svix when a valid message is found.
44

55
## Usage
66

77
```
8-
svix-agent -c path/to/svix-agent.yaml
8+
svix-webhook-bridge -c path/to/svix-webhook-bridge.yaml
99
```
1010

1111
## Configuration
1212

13-
> For an annotated sample configuration see [the example config](svix-agent.example.yaml).
13+
> For an annotated sample configuration see [the example config](svix-webhook-bridge.example.yaml).
1414
15-
`svix-agent` is organized in terms of "plugins" which are tasks that run in tandem.
16-
Each plugin represents a unit of work performed while the agent while it runs.
15+
`svix-webhook-bridge` is organized in terms of "plugins" which are tasks that run in tandem.
16+
Each plugin represents a unit of work performed while the service runs.
1717

18-
Presently there are 2 "plugins" available for `svix-agent`.
18+
Presently there are 2 "plugins" available for `svix-webhook-bridge`.
1919

20-
### svix-agent-plugin-generic
20+
### svix-webhook-bridge-plugin-queue-consumer
2121

2222
This plugin consumes messages from message queues to and forwards them to Svix to create messages.
2323

@@ -56,7 +56,7 @@ Messages received by these consumers must follow an expected format:
5656
For detail on the `message` field, see: <https://api.svix.com/docs#tag/Message/operation/v1.message.create>
5757

5858
Important to note that queues, exchanges, topics, or what have you, should be created and configured independently,
59-
prior to using the agent plugin. There's nothing in place to automatically create these resources.
59+
prior to using the plugin. There's nothing in place to automatically create these resources.
6060
The plugin will only try (and fail) to read from the stream in such a case.
6161

6262

@@ -129,7 +129,7 @@ Note that the SQS consumer requires credentials to be set as environment vars:
129129
- `AWS_ACCESS_KEY_ID`
130130
- `AWS_SECRET_ACCESS_KEY`
131131

132-
> This incidentally means all SQS consumers configured for a given `svix-agent` will need to share these details.
132+
> This incidentally means all SQS consumers configured for a given `svix-webhook-bridge` will need to share these details.
133133

134134
```yaml
135135
plugins:
@@ -145,12 +145,12 @@ plugins:
145145
```
146146

147147

148-
### svix-agent-plugin-webhook-receiver
148+
### svix-webhook-bridge-plugin-webhook-receiver
149149

150150
This plugin starts an HTTP server which accepts webhooks and forwards them to one of the supported messaging
151151
systems.
152152

153-
Again, same as with `svix-agent-plugin-generic`, the supported systems are:
153+
Again, same as with `svix-webhook-bridge-plugin-queue-consumer`, the supported systems are:
154154

155155
- GCP Pub/Sub
156156
- RabbitMQ

webhook-bridge/generic-queue/src/gcp_pubsub.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ impl<T: 'static + Serialize + Send + Sync> TaskQueueSend<T> for GCPPubSubQueuePr
222222
let topic = self.client.topic(&self.topic);
223223

224224
// Publishing to a non-existent topic will cause the publisher to wait (forever?)
225-
// Giving this error will allow dependents like `svix-agent-plugin-webhook-receiver` to
225+
// Giving this error will allow dependents like `svix-webhook-bridge-plugin-webhook-receiver` to
226226
// respond 500 immediately when this happens, instead of holding the connection open
227227
// indefinitely.
228228
if !topic.exists(None).await.map_err(QueueError::generic)? {

webhook-bridge/svix-agent-plugin-generic/Cargo.toml renamed to webhook-bridge/svix-webhook-bridge-plugin-queue-consumer/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "svix-agent-plugin-generic"
2+
name = "svix-webhook-bridge-plugin-queue-consumer"
33
version = "0.1.0"
44
edition = "2021"
55

@@ -11,7 +11,7 @@ generic_queue = { path = "../generic-queue" }
1111
serde_json = "1.0"
1212
serde = { version = "1.0", features = ["derive"] }
1313
svix = "0.84.1"
14-
svix-agent-types = { path = "../svix-agent-types" }
14+
svix-webhook-bridge-types = { path = "../svix-webhook-bridge-types" }
1515
tokio = { version = "1", features = ["full"] }
1616
tokio-executor-trait = "2.1"
1717
tokio-reactor-trait = "1.1"
File renamed without changes.
File renamed without changes.

webhook-bridge/svix-agent-plugin-generic/src/gcp_pubsub/mod.rs renamed to webhook-bridge/svix-webhook-bridge-plugin-queue-consumer/src/gcp_pubsub/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use generic_queue::gcp_pubsub::{
99
use generic_queue::{Delivery, TaskQueueBackend, TaskQueueReceive};
1010
use std::time::{Duration, Instant};
1111
use svix::api::Svix;
12-
use svix_agent_types::{async_trait, Plugin};
12+
use svix_webhook_bridge_types::{async_trait, Plugin};
1313
use tracing::instrument;
1414

1515
pub struct GCPPubSubConsumerPlugin {

webhook-bridge/svix-agent-plugin-generic/src/lib.rs renamed to webhook-bridge/svix-webhook-bridge-plugin-queue-consumer/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use generic_queue::{
1010
};
1111
use serde::{Deserialize, Serialize};
1212
use svix::api::{MessageIn, PostOptions as PostOptions_, Svix};
13-
use svix_agent_types::{async_trait, Plugin};
13+
use svix_webhook_bridge_types::{async_trait, Plugin};
1414

1515
pub mod config;
1616
pub use config::{

0 commit comments

Comments
 (0)