4 Commits
Author SHA1 Message Date
Rene Nochebuena ad4cd5ec72 chore(cache-valkey): framework version alignment to v1.1.3 2026-08-08 01:26:25 -06:00
Rene Nochebuena df462ca031 chore(cache-valkey): framework version alignment to v1.1.2 2026-08-08 00:43:17 -06:00
Rene Nochebuena 60226ecc01 docs(cache-valkey): fix wiring doc examples; align to v1.1.1 2026-08-07 23:32:17 -06:00
Rene Nochebuena 8907fed474 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>
2026-08-07 22:18:54 -06:00
6 changed files with 46 additions and 16 deletions
+27
View File
@@ -4,6 +4,33 @@ All notable changes to this module are documented here.
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
This module adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.1.3] — 2026-08-08
Patch — coordinated framework version alignment.
### Changed
- Bumped einherjar dependencies (\`contracts\`, \`core\`) to v1.1.3. No code or API changes.## [1.1.2] — 2026-08-08
Patch — coordinated framework version alignment.
### Changed
- Bumped `contracts`, `core` to v1.1.2. No code or API changes.
## [1.1.1] — 2026-08-07
Patch — corrected doc examples plus framework version alignment.
### Fixed
- Package doc examples used a fictional `launcher.Register` / `health.Register` API; corrected to
`lc.Append` + `web/health.NewHandler(...).ServeHTTP`. Verified by compiling against the real API.
### Changed
- Bumped `contracts` and `core` to v1.1.1.
## [1.1.0] — 2026-08-07
Coordinated framework version alignment — released in lockstep at v1.1.0.
+6 -5
View File
@@ -1,6 +1,6 @@
# einherjar/cache-valkey
[![version](https://img.shields.io/badge/version-v1.1.0-5C4EE5?style=flat-square)](https://code.nochebuena.dev/einherjar/cache-valkey)
[![version](https://img.shields.io/badge/version-v1.1.3-5C4EE5?style=flat-square)](https://code.nochebuena.dev/einherjar/cache-valkey)
[![license](https://img.shields.io/badge/license-AGPL--3.0-22863A?style=flat-square)](LICENSE)
[![go](https://img.shields.io/badge/Go-1.26+-00ADD8?style=flat-square&logo=go&logoColor=white)](https://go.dev)
[![health](https://img.shields.io/badge/health-degraded-E36209?style=flat-square)]()
@@ -17,8 +17,9 @@ import cachevalkey "code.nochebuena.dev/einherjar/cache-valkey"
vk := cachevalkey.New(logger, cachevalkey.Config{
Addrs: []string{"localhost:6379"},
})
launcher.Register(vk) // OnInit → OnStart → OnStop
health.Register(vk) // PING-based health check, LevelDegraded
lc.Append(vk) // OnInit → OnStart → OnStop
// vk is observability.Checkable (PING-based, LevelDegraded):
srv.Get("/health", health.NewHandler(logger, vk).ServeHTTP)
```
## Connecting to other modules
@@ -30,8 +31,8 @@ them directly to the consuming modules:
```go
// --- 1. Create the component (lifecycle + health + Provider) ---
vk := cachevalkey.New(logger, cfg)
launcher.Register(vk)
health.Register(vk)
lc.Append(vk)
srv.Get("/health", health.NewHandler(logger, vk).ServeHTTP)
// --- 2. Create adapters (one per consumer interface) ---
// Each adapter wraps vk (a Provider) and satisfies one interface in another module.
+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
+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
//
+2 -2
View File
@@ -3,8 +3,8 @@ module code.nochebuena.dev/einherjar/cache-valkey
go 1.26
require (
code.nochebuena.dev/einherjar/contracts v1.1.0
code.nochebuena.dev/einherjar/core v1.1.0
code.nochebuena.dev/einherjar/contracts v1.1.3
code.nochebuena.dev/einherjar/core v1.1.3
github.com/valkey-io/valkey-go v1.0.54
)
+4 -4
View File
@@ -1,7 +1,7 @@
code.nochebuena.dev/einherjar/contracts v1.1.0 h1:GsGr6reyrd9qCc7D8CqbT1LWPTeeK9lT4r4EdsNA5Ro=
code.nochebuena.dev/einherjar/contracts v1.1.0/go.mod h1:ccltUtrFb5+MEJdkx2VVEUL+xC5pupVlVVsMM8AlCWI=
code.nochebuena.dev/einherjar/core v1.1.0 h1:zxj9bFPthEEFRnvWV/vgNZqWa2y/kAo3p5pODWablyk=
code.nochebuena.dev/einherjar/core v1.1.0/go.mod h1:Ot2JbjsnZ33Ed5C9Ev1kSn2PW+F4dLz/LRwIUh+fYt0=
code.nochebuena.dev/einherjar/contracts v1.1.3 h1:rBtQUVCeqaIKMcG1+R0ndHM/4cRm3XTFnVNzFTbf1QU=
code.nochebuena.dev/einherjar/contracts v1.1.3/go.mod h1:ccltUtrFb5+MEJdkx2VVEUL+xC5pupVlVVsMM8AlCWI=
code.nochebuena.dev/einherjar/core v1.1.3 h1:MjWUA/hJ5IOosACh0in9xzFZ7jc1TTO0YEHh1xQVuOg=
code.nochebuena.dev/einherjar/core v1.1.3/go.mod h1:xkI2uQ4S0FQHbFiawTUFgJdG5jbivcZpGFddHxQe8Q0=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/onsi/gomega v1.36.2 h1:koNYke6TVk6ZmnyHrCXba/T/MoLBXFjeC1PtvYgw0A8=