docs(cache-valkey): fix fictional launcher.Register/health.Register in doc examples

The package-doc examples showed a fictional launcher.Register / health.Register
API (and launcher.Append as a package func). Corrected to the real wiring:
lc.Append + web/health.NewHandler(...).ServeHTTP.
(component.go doc comment corrected too.)

Documentation-only. No code, API, or dependency changes; version stays v1.1.0
(the v1.1.0 tag is moved to include this fix). Verified by compiling the
corrected pattern against the real API.
This commit is contained in:
2026-08-07 22:14:06 -06:00
parent 7ccd0694fb
commit 20b2595082
3 changed files with 12 additions and 9 deletions
+3 -2
View File
@@ -4,8 +4,9 @@
// # Quick start
//
// vk := cachevalkey.New(logger, cfg)
// launcher.Register(vk) // lifecycle: OnInit → OnStart → OnStop
// health.Register(vk) // health: PING-based, LevelDegraded
// lc.Append(vk) // lifecycle: OnInit → OnStart → OnStop
// // vk satisfies observability.Checkable (PING-based, LevelDegraded) — wire a health endpoint:
// srv.Get("/health", health.NewHandler(logger, vk).ServeHTTP)
//
// # Adapters
//