Commit Graph
71 Commits
Author SHA1 Message Date
tiennm99 30c75cafbe build(deps): update Go dependencies and track the Go 1 builder image
go-redis 9.19.0 to 9.23.0, mongo-driver 2.6.0 to 2.9.2, gocb 2.12.3 to
2.13.0, go-sql-driver/mysql 1.10.0 to 1.10.1, and their transitive modules.
The update raises the module's go directive to 1.26, so the builder image
moves from golang:1.25-alpine to the moving major tag golang:1-alpine.
2026-10-09 11:20:09 +07:00
tiennm99 0af652953f fix: bound connects, write on start, and tighten config checks
- Each connect attempt, including initialization, times out after 1 minute,
  and PostgreSQL DSNs without connect_timeout get connect_timeout=30, since
  lib/pq honours the context only while dialing.
- A service increments right after connecting, so a restart writes even
  when the interval outlasts the process.
- A config path that is a directory (Docker's stand-in for a missing
  bind-mount source) fails with a clear message.
- Generated service names take the first free suffix, and suffixed names
  are reserved so an explicit name cannot silently collide with them.
- counter_key inside a service's config map is rejected instead of being
  overwritten.
- Unknown keys in the config file log a warning without blocking start.
- A .dockerignore keeps local configs and .env out of the build context.
2026-10-09 11:15:59 +07:00
tiennm99 5067966364 docs(plans): add adapter consolidation and new services review 2026-10-09 11:10:45 +07:00
tiennm99 42c8a871cf fix(runner): retry failed services after one minute and fail fast on bad config
A failed connect or tick now closes the connection and reconnects after one
minute, re-running initialization so a dropped table or row is recreated.
Before, a failing tick logged every interval forever and connect retries
logged every 10 seconds.

Connection URLs that fail to parse no longer appear in logs, since their
error repeats the password.

An unknown adapter or a missing required config key now stops keepalive at
startup instead of silently idling one service.
2026-10-09 11:10:45 +07:00
tiennm99 30fd62a46c fix(couchbase): increment atomically under the tick context
Increment read the counter and wrote it back, ignoring the tick context, and
treated any read error as a missing document, so a timeout reset the counter
to 1. A single binary increment is atomic, honours the context, and surfaces
real errors. The cluster is also assigned only after a successful connect so
a failed connect is not closed twice.
2026-10-09 11:10:45 +07:00
tiennm99 cbcee9ccd8 refactor(adapter)!: drop the valkey adapter in favor of redis
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.
2026-10-09 11:10:44 +07:00
tiennm99 77b9a9673b build(compose): drop the misleading port from the keepalive service 2026-10-07 09:11:29 +07:00
tiennm99 3c03e2ce06 chore: ignore local config.yml 2026-10-07 08:52:05 +07:00
tiennm99 c1041e3062 build(compose): adapt compose file for Coolify deployment
Drop container_name and the local image tag, which conflict with Coolify's own container and image naming, and expose the configured app port without publishing it. Document the Coolify file storage for config.yml.
2026-10-07 08:47:35 +07:00
tiennm99 720a264e5f docs: point migrated-from section at in-repo absorbed histories 2026-08-05 00:21:03 +07:00
tiennm99 b64da580a2 Remove absorbed legacy keepalive implementations
Their full histories remain under redis/, valkey/, postgresql/, mysql/, mongodb/,
and couchbase/ in earlier commits; keepalive itself implements all of them.
2026-08-05 00:19:41 +07:00
tiennm99 1ec8c45c26 feat: init
using claude
2025-11-23 00:33:36 +07:00
tiennm99 764551f30f build(deps): bump google.golang.org/grpc from 1.74.2 to 1.79.3 (#3)
Fixes authorization-bypass CVE. Updates transitive deps:
golang.org/x/net, x/sys, x/text, genproto/rpc, protobuf.
2026-05-23 19:19:34 +07:00
tiennm99 003318339a docs: redirect to consolidated db-keepalive 2026-05-11 20:16:18 +07:00
tiennm99 0d119a0cd9 docs: add Related section linking sibling repos 2026-05-11 17:59:25 +07:00
tiennm99 12b5307a71 feat(core): replace increment with get & set 2025-12-02 22:35:12 +07:00
tiennm99 c07c6141ba feat(docker): cleanup 2025-11-26 22:22:40 +07:00
tiennm99 af0810ccb7 feat: not fatal if one failed 2025-11-26 20:25:42 +07:00
tiennm99 6256f15c49 feat(docker): init 2025-11-24 20:42:19 +07:00
tiennm99 b71b6d5da2 feat(schedule): add ticker 2025-11-24 20:41:24 +07:00
tiennm99 20d60de285 feat(couchbase): test connection 2025-11-24 20:21:14 +07:00
tiennm99 7848878bf5 feat(coucbase): add example 2025-11-24 20:03:52 +07:00
tiennm99 a7b10b80be feat(core): init 2025-11-24 20:00:20 +07:00
tiennm99 6b751a04dd docs: redirect to consolidated db-keepalive 2026-05-11 20:16:13 +07:00
tiennm99 d4e8cc1d8d docs: add Related section linking sibling repos 2026-05-11 17:59:15 +07:00
tiennm99 4a26cacdda feat(docker): add dockerfile 2025-11-26 21:54:30 +07:00
tiennm99 fa54bdb84b feat: init logic 2025-11-26 21:54:12 +07:00
tiennm99 a070a22180 docs: redirect to consolidated db-keepalive 2026-05-11 20:16:09 +07:00
tiennm99 5617d53349 docs: add Related section linking sibling repos 2026-05-11 17:59:17 +07:00
tiennm99 e09ddceb37 feat: remove driver name config 2025-11-27 22:39:57 +07:00
tiennm99 40e433e284 Update Dockerfile 2025-11-27 22:08:30 +07:00
tiennm99 e14405ba04 Update Dockerfile 2025-11-27 22:05:35 +07:00
tiennm99 b2cf48c149 feat: init 2025-11-27 21:56:42 +07:00
tiennm99 f294bd6dcb docs: redirect to consolidated db-keepalive 2026-05-11 20:16:05 +07:00
tiennm99 4bb49c0305 docs: add Related section linking sibling repos 2026-05-11 17:59:21 +07:00
tiennm99 92e7b9d0a4 Update init.sql 2025-11-27 23:05:02 +07:00
tiennm99 c334a4b54f feat: init 2025-11-27 22:32:53 +07:00
tiennm99 7fddc3e04b docs: fix redirect README env-var snippet 2026-05-11 20:17:38 +07:00
tiennm99 7c6569fbe3 docs: redirect to consolidated db-keepalive 2026-05-11 20:16:02 +07:00
tiennm99 dd5f53d0c1 docs: add Related section linking sibling repos 2026-05-11 17:59:23 +07:00
tiennm99 24c0f55480 Revert "refactor: use sample code from Aiven"
This reverts commit 7bbc70bcbf6570c448c0d8a641b1dfa1f4b32ed3.
2025-11-27 00:11:30 +07:00
tiennm99 3baf0e545c refactor: use sample code from Aiven 2025-11-27 00:00:54 +07:00
tiennm99 8bfbf7658a feat: init 2025-11-26 23:50:55 +07:00
tiennm99 972ec6d39f docs: fix redirect README env-var snippet 2026-05-11 20:16:58 +07:00
tiennm99 7037d4f2bc docs: redirect to consolidated db-keepalive 2026-05-11 20:15:58 +07:00
tiennm99 4aabcd23bf docs: add Related section linking sibling repos 2026-05-11 17:59:19 +07:00
tiennm99 58c63c5688 Update .gitignore 2026-01-16 13:59:41 +07:00
tiennm99 bfed7d4dec Update main.go 2025-11-26 22:12:06 +07:00
tiennm99 740c34daf3 feat(docker): add dockerfile 2025-11-26 20:47:47 +07:00
tiennm99 681b737f2f feat: init 2025-11-26 20:46:40 +07:00
tiennm99 56aafff102 chore: remove dependabot version-update config 2026-07-25 14:14:01 +07:00
tiennm99 82e9993fbe fix(deps): bump golang.org/x/crypto and golang.org/x/net to patch security advisories 2026-07-17 17:21:02 +07:00
tiennm99 afa710289c docs(config): add interval and counter examples 2026-06-29 11:34:59 +07:00
tiennm99 30660b95f5 docs(config): clarify scoped intervals 2026-06-29 10:40:29 +07:00
tiennm99 7ac1fc3a7c refactor(config): move service name helpers 2026-06-29 10:40:07 +07:00
tiennm99 4803f990b4 docs(readme): add missing adapter examples 2026-06-29 00:01:18 +07:00
tiennm99 67be5df98c docs(config): add examples for all adapters 2026-06-28 23:53:51 +07:00
tiennm99 8108288dca feat(redis): add namespace counter key 2026-06-28 19:35:06 +07:00
tiennm99 77b08464b0 fix(couchbase): restore readiness timeout 2026-06-28 19:20:05 +07:00
tiennm99 0ad7fbebfc fix(couchbase): improve readiness timeout 2026-06-28 19:02:31 +07:00
tiennm99 6b0c2f5a4c fix(runtime): initialize resources per service 2026-06-28 18:03:16 +07:00
tiennm99 16cf6277e1 feat(config): use config yml defaults 2026-06-28 14:39:17 +07:00
tiennm99 08da9dcb84 fix(config): discover mounted yml config 2026-06-28 14:05:48 +07:00
tiennm99 9a69030179 fix(build): align docker go version 2026-06-28 13:52:03 +07:00
tiennm99 f418e4aad7 feat(deploy): add local compose setup 2026-06-28 13:47:29 +07:00
tiennm99 f3a23ee91e feat(config): support multi-service yaml config 2026-06-28 09:27:43 +07:00
tiennm99 655db8dcbf feat(config): standardize keepalive env names 2026-06-27 21:47:14 +07:00
tiennm99 f5218ea327 refactor: rename project to keepalive 2026-06-27 21:24:17 +07:00
tiennm99 b660700991 chore: drop inapplicable dependabot ecosystems (#6) 2026-05-23 11:09:17 +07:00
tiennm99 4745ed96e2 chore: add dependabot config (#4) 2026-05-23 10:48:42 +07:00
tiennm99 e3b7ea5011 feat: initial db-keepalive — pluggable adapters for 6 free-tier DBs
Consolidates the *-keepalive family (redis, valkey, postgresql, mysql,
mongodb, couchbase) into a single binary with a runtime DB_TYPE dispatch
and an Adapter interface. Original repos archived with a pointer here.
2026-05-11 20:15:35 +07:00