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

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.

Reviewed-on: #2
Co-authored-by: Rene Nochebuena Guerrero <rene@nochebuena.dev>
Co-committed-by: Rene Nochebuena Guerrero <rene@nochebuena.dev>
This commit was merged in pull request #2.
This commit is contained in:
2026-08-07 22:18:54 -06:00
committed by NOCHEBUENADEV
parent 7ccd0694fb
commit 8907fed474
3 changed files with 12 additions and 9 deletions
+4 -3
View File
@@ -7,10 +7,11 @@ import (
// Component is the full cache-valkey capability: lifecycle management, health checks,
// and all Provider operations.
// Register with launcher and health before starting the application:
// Append it to a launcher, and wire a health endpoint (it satisfies
// observability.Checkable):
//
// launcher.Register(vk)
// health.Register(vk)
// lc.Append(vk)
// srv.Get("/health", health.NewHandler(logger, vk).ServeHTTP)
type Component interface {
lifecycle.Component
observability.Checkable