88 Commits
Author SHA1 Message Date
tiennm99 e445b5cbc5 docs: move reference material from the README into docs
The README now covers what keepalive is, a quick start, the adapter table,
and links. Reference material moves to docs/: configuration (every option,
per-adapter keys, validation), deployment (Compose, Coolify, Docker, source),
how it works (writes, retries, timeouts, logging), known issues (PostgreSQL
public-schema permissions and Aiven's ACL key-pattern tilde, by log line),
and adding an adapter (now including ConfigKeys registration).

.gitignore also excludes config.yaml, matching .dockerignore.
2026-10-09 12:37:52 +07:00
tiennm99 901b4f7b03 chore: remove the plans folder 2026-10-09 12:36:21 +07:00
tiennm99 47afb85093 fix: close remaining secret leaks, timeout gaps and config blind spots
- Generated service names come only from a URL host, a key=value DSN's
  host=, or a MySQL tcp() address, so a password in a key=value DSN can no
  longer end up in the name printed on every log line.
- connect_timeout is added only to postgres:// and postgresql:// URLs
  (parsed, so it never lands after a fragment) or as a key=value token, never
  glued onto a key=value value containing "://".
- Driver parse errors that quote password fragments (mongo escape errors,
  lib/pq's missing "=" error) are replaced with generic hints.
- MongoDB keeps its client only after a successful connect, so a failed
  connect is not disconnected twice.
- Couchbase gets ready_timeout plus 1 minute to connect, so raising
  ready_timeout takes effect.
- Shutdown waits at most 7 seconds, inside Docker's 10-second grace period.
- Each adapter declares its config keys; unknown keys anywhere in the file,
  including under config, log a warning without blocking start.
2026-10-09 12:36:21 +07:00
tiennm99 e646af19b8 fix(redis): silence go-redis's internal dial logging
go-redis logs each failed dial attempt, several lines per connect, on top of
the runner's single error line per one-minute retry.
2026-10-09 11:20:09 +07:00
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
dependabot[bot] 9ce7e2364a build(deps): bump go.opentelemetry.io/otel from 1.37.0 to 1.41.0 (#2)
Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.37.0 to 1.41.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.37.0...v1.41.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel
  dependency-version: 1.41.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-07 13:33:13 +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
Tien Nguyen Minh de29516233 Initial commit 2025-11-22 23:40:05 +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
dependabot[bot] f083986e57 build(deps): bump golang.org/x/crypto from 0.41.0 to 0.45.0 (#1)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.41.0 to 0.45.0.
- [Commits](https://github.com/golang/crypto/compare/v0.41.0...v0.45.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.45.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-07 13:33:29 +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
Tien Nguyen Minh 35ba5cf7ad Initial commit 2025-11-26 21:13:21 +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
dependabot[bot] 4c4552f49e build(deps): bump filippo.io/edwards25519 from 1.1.0 to 1.1.1 (#1)
Bumps [filippo.io/edwards25519](https://github.com/FiloSottile/edwards25519) from 1.1.0 to 1.1.1.
- [Commits](https://github.com/FiloSottile/edwards25519/compare/v1.1.0...v1.1.1)

---
updated-dependencies:
- dependency-name: filippo.io/edwards25519
  dependency-version: 1.1.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-07 13:33:25 +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
Tien Nguyen Minh f4827f15c9 Initial commit 2025-11-27 20:34:49 +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
Tien Nguyen Minh 6cc81d397a Initial commit 2025-11-27 22:13:39 +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