mirror of
https://github.com/rustfs/rustfs.git
synced 2026-01-16 17:20:33 +00:00
feat: improve webhook server and run script integration
- Enhance webhook example with proper shutdown handling using tokio::select! - Update run.sh to automatically start webhook server alongside main service - Add event notification configuration to run.sh using environment variables - Set proper port bindings to ensure webhook server starts on port 3000 - Improve console output for better debugging experience - Fix race condition during service startup and shutdown This change ensures proper integration between the webhook server and the main rustfs service, providing a seamless development experience with automatic service discovery and clean termination.
This commit is contained in:
29
deploy/config/event.example.toml
Normal file
29
deploy/config/event.example.toml
Normal file
@@ -0,0 +1,29 @@
|
||||
# config.toml
|
||||
store_path = "./deploy/logs/event_store"
|
||||
channel_capacity = 5000
|
||||
|
||||
[[adapters]]
|
||||
type = "Webhook"
|
||||
endpoint = "http://127.0.0.1:3000/webhook"
|
||||
auth_token = "your-auth-token"
|
||||
max_retries = 3
|
||||
timeout = 50
|
||||
|
||||
[adapters.custom_headers]
|
||||
custom_server = "value_server"
|
||||
custom_client = "value_client"
|
||||
|
||||
#[[adapters]]
|
||||
#type = "Kafka"
|
||||
#brokers = "localhost:9092"
|
||||
#topic = "notifications"
|
||||
#max_retries = 3
|
||||
#timeout = 60
|
||||
#
|
||||
#[[adapters]]
|
||||
#type = "Mqtt"
|
||||
#broker = "mqtt.example.com"
|
||||
#port = 1883
|
||||
#client_id = "event-notifier"
|
||||
#topic = "events"
|
||||
#max_retries = 3
|
||||
Reference in New Issue
Block a user