mirror of
https://github.com/tiennm99/keepalive.git
synced 2026-10-11 03:13:31 +00:00
Valkey speaks the Redis protocol, so the redis adapter (go-redis) already serves it. Dropping valkey-go removes a dependency and shrinks the stripped binary by about 9 MB. The redis adapter now also closes a client that failed to connect only once. BREAKING CHANGE: `adapter: valkey` is no longer accepted. Use `adapter: redis` with a redis:// or rediss:// URL instead of valkey:// or valkeys://. The namespace option now applies to these services.
48 lines
1.3 KiB
YAML
48 lines
1.3 KiB
YAML
# Optional default interval shared by every service.
|
|
# Examples: 30s, 5m, 1h, 1h30m, 1.5h, or 90 for 90 seconds.
|
|
interval: 1m
|
|
counter_key: counter
|
|
|
|
services:
|
|
- adapter: redis
|
|
config:
|
|
url: redis://default@redis-a.example.com:6379
|
|
namespace: keepalive
|
|
|
|
# Valkey, Dragonfly, KeyDB and other Redis-compatible stores use the redis
|
|
# adapter with a redis:// or rediss:// (TLS) URL.
|
|
- name: valkey-a
|
|
adapter: redis
|
|
# Example: this service overrides root interval and counter_key.
|
|
interval: 30s
|
|
counter_key: valkey-counter
|
|
config:
|
|
url: rediss://default@valkey-a.example.com:6379
|
|
namespace: keepalive
|
|
|
|
- adapter: postgresql
|
|
config:
|
|
url: postgresql://user:pass@postgres-a.example.com:5432/keepalive?sslmode=require
|
|
|
|
- adapter: mysql
|
|
config:
|
|
dsn: user:pass@tcp(mysql-a.example.com:3306)/keepalive
|
|
|
|
- adapter: mongodb
|
|
config:
|
|
uri: mongodb+srv://user:pass@mongo-a.example.com
|
|
database: keepalive
|
|
collection: counter
|
|
|
|
- adapter: couchbase
|
|
config:
|
|
connection_string: couchbases://couchbase-a.example.com
|
|
username: user
|
|
password: pass
|
|
bucket_name: keepalive
|
|
scope_name: _default
|
|
collection_name: _default
|
|
ready_timeout: 30s
|
|
# Optional. Set only when this user can create a missing bucket.
|
|
# bucket_ram_quota_mb: 128
|