Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
60226ecc01
|
||
|
|
8907fed474
|
||
|
|
7ccd0694fb
|
@@ -4,6 +4,28 @@ All notable changes to this module are documented here.
|
|||||||
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
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).
|
This module adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [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.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Bumped einherjar dependencies (`contracts`, `core`) to v1.1.0 via `go get` + `go mod tidy`.
|
||||||
|
No code or API changes.
|
||||||
|
|
||||||
## [1.0.0] — 2026-05-28
|
## [1.0.0] — 2026-05-28
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# einherjar/cache-valkey
|
# einherjar/cache-valkey
|
||||||
|
|
||||||
[](https://code.nochebuena.dev/einherjar/cache-valkey)
|
[](https://code.nochebuena.dev/einherjar/cache-valkey)
|
||||||
[](LICENSE)
|
[](LICENSE)
|
||||||
[](https://go.dev)
|
[](https://go.dev)
|
||||||
[]()
|
[]()
|
||||||
@@ -17,8 +17,9 @@ import cachevalkey "code.nochebuena.dev/einherjar/cache-valkey"
|
|||||||
vk := cachevalkey.New(logger, cachevalkey.Config{
|
vk := cachevalkey.New(logger, cachevalkey.Config{
|
||||||
Addrs: []string{"localhost:6379"},
|
Addrs: []string{"localhost:6379"},
|
||||||
})
|
})
|
||||||
launcher.Register(vk) // OnInit → OnStart → OnStop
|
lc.Append(vk) // OnInit → OnStart → OnStop
|
||||||
health.Register(vk) // PING-based health check, LevelDegraded
|
// vk is observability.Checkable (PING-based, LevelDegraded):
|
||||||
|
srv.Get("/health", health.NewHandler(logger, vk).ServeHTTP)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Connecting to other modules
|
## Connecting to other modules
|
||||||
@@ -30,8 +31,8 @@ them directly to the consuming modules:
|
|||||||
```go
|
```go
|
||||||
// --- 1. Create the component (lifecycle + health + Provider) ---
|
// --- 1. Create the component (lifecycle + health + Provider) ---
|
||||||
vk := cachevalkey.New(logger, cfg)
|
vk := cachevalkey.New(logger, cfg)
|
||||||
launcher.Register(vk)
|
lc.Append(vk)
|
||||||
health.Register(vk)
|
srv.Get("/health", health.NewHandler(logger, vk).ServeHTTP)
|
||||||
|
|
||||||
// --- 2. Create adapters (one per consumer interface) ---
|
// --- 2. Create adapters (one per consumer interface) ---
|
||||||
// Each adapter wraps vk (a Provider) and satisfies one interface in another module.
|
// Each adapter wraps vk (a Provider) and satisfies one interface in another module.
|
||||||
|
|||||||
+4
-3
@@ -7,10 +7,11 @@ import (
|
|||||||
|
|
||||||
// Component is the full cache-valkey capability: lifecycle management, health checks,
|
// Component is the full cache-valkey capability: lifecycle management, health checks,
|
||||||
// and all Provider operations.
|
// 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)
|
// lc.Append(vk)
|
||||||
// health.Register(vk)
|
// srv.Get("/health", health.NewHandler(logger, vk).ServeHTTP)
|
||||||
type Component interface {
|
type Component interface {
|
||||||
lifecycle.Component
|
lifecycle.Component
|
||||||
observability.Checkable
|
observability.Checkable
|
||||||
|
|||||||
@@ -4,8 +4,9 @@
|
|||||||
// # Quick start
|
// # Quick start
|
||||||
//
|
//
|
||||||
// vk := cachevalkey.New(logger, cfg)
|
// vk := cachevalkey.New(logger, cfg)
|
||||||
// launcher.Register(vk) // lifecycle: OnInit → OnStart → OnStop
|
// lc.Append(vk) // lifecycle: OnInit → OnStart → OnStop
|
||||||
// health.Register(vk) // health: PING-based, LevelDegraded
|
// // vk satisfies observability.Checkable (PING-based, LevelDegraded) — wire a health endpoint:
|
||||||
|
// srv.Get("/health", health.NewHandler(logger, vk).ServeHTTP)
|
||||||
//
|
//
|
||||||
// # Adapters
|
// # Adapters
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ module code.nochebuena.dev/einherjar/cache-valkey
|
|||||||
go 1.26
|
go 1.26
|
||||||
|
|
||||||
require (
|
require (
|
||||||
code.nochebuena.dev/einherjar/contracts v1.0.0
|
code.nochebuena.dev/einherjar/contracts v1.1.1
|
||||||
code.nochebuena.dev/einherjar/core v1.0.0
|
code.nochebuena.dev/einherjar/core v1.1.1
|
||||||
github.com/valkey-io/valkey-go v1.0.54
|
github.com/valkey-io/valkey-go v1.0.54
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
code.nochebuena.dev/einherjar/contracts v1.0.0 h1:hRudEtOIqU7vwedYLsCh8+9q5dCnKb61qX+zibqImRU=
|
code.nochebuena.dev/einherjar/contracts v1.1.1 h1:MRQUR8Q1D4wIOUIz11vpAdsapWqFTMwr0/VRvWbGO3s=
|
||||||
code.nochebuena.dev/einherjar/contracts v1.0.0/go.mod h1:ccltUtrFb5+MEJdkx2VVEUL+xC5pupVlVVsMM8AlCWI=
|
code.nochebuena.dev/einherjar/contracts v1.1.1/go.mod h1:ccltUtrFb5+MEJdkx2VVEUL+xC5pupVlVVsMM8AlCWI=
|
||||||
code.nochebuena.dev/einherjar/core v1.0.0 h1:AueZgfjp3+rQmDKOxmJQ945TTh+sqC1l/xJdTOdbr9w=
|
code.nochebuena.dev/einherjar/core v1.1.1 h1:W6V/Peh1ffWjqZnBuBQLn4UGM+bgvWt9MQuktTEfDFw=
|
||||||
code.nochebuena.dev/einherjar/core v1.0.0/go.mod h1:0IywfRnJXX9xXQO6iPVaq2QDlXbbpXrB8A4T7gO8nE4=
|
code.nochebuena.dev/einherjar/core v1.1.1/go.mod h1:ninuZlnO178zC4rOdt5vjGojnlOpygP8cDorrecAeTY=
|
||||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
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/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||||
github.com/onsi/gomega v1.36.2 h1:koNYke6TVk6ZmnyHrCXba/T/MoLBXFjeC1PtvYgw0A8=
|
github.com/onsi/gomega v1.36.2 h1:koNYke6TVk6ZmnyHrCXba/T/MoLBXFjeC1PtvYgw0A8=
|
||||||
|
|||||||
Reference in New Issue
Block a user