Help us shape the future of Go! Take the 2026 Go Developer Survey

ekit-data

module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2026 License: MIT

README

ekit-data

数据访问轻量件——缓存抽象与进程内缓存、分片定时任务。

本仓库是 ekit(git.enjoye.top/enjoydream/ekit v0.34.0) 拆分出的独立 Go module,属于 yi-nology ekit 子项目矩阵(Round-2 深拆粒度)。

安装

go get github.com/yi-nology/ekit-data@v0.2.0

包清单

  • `cache/` — cache 抽象接口 + LocalCache(LRU O(1)、TOCTOU 修复)+ SingleFlightCache
  • `timertask/` — 分片定时任务(FNV-1a hash)

SQL/GORM 全家已迁 ekit-gorm;Redis 全家已迁 ekit-redis。

依赖关系

子项目矩阵与依赖方向(自底向上,19 仓):

ekit-core            文本/数据工具 + governance/lifecycle/version      (零内部依赖)
ekit-concurrency     并发与流控原语                                     (零内部依赖)
ekit-logx            日志门面 + shutdown                                (零内部依赖)
ekit-istio           Istio Proxyless                                    (零内部依赖)
  ekit-metrics       Prometheus 门面                          → core
  ekit-tracing       OTel + traceid                           → logx
  ekit-registry      注册发现 + 配置                          → core, logx
    ekit-data        缓存抽象 + 定时任务                      → core, logx, concurrency
      ekit-gorm      SQL/GORM 全家                            → core, logx
      ekit-redis     Redis 全家                               → data, core, logx
    ekit-httpx       HTTP 客户端 + 负载均衡                   → core, concurrency, logx, metrics, tracing, registry
      ekit-nns       服务治理客户端                           → httpx, registry, core, logx, tracing, metrics
        ekit-bootstrap 应用引导
    ekit-middleware  Hertz 中间件栈                           → core, concurrency, logx, metrics, tracing, registry
    ekit-hertz       Hertz 运行时/适配/instrumentation        → middleware, gorm, nns, registry, metrics, tracing, logx, core
    ekit-kitex       Kitex 生态                               → nns, registry, core, concurrency, logx, metrics
  ekit-workflow      流程编排                                 → concurrency, logx

注:ekit-observability 已在 Round-2 深拆中解散——logx 迁 [ekit-logx]、metrics 迁 [ekit-metrics]、 tracing/traceid 迁 [ekit-tracing]、shutdown 迁 [ekit-logx];原仓库已归档。

依赖:ekit-core、ekit-logx、ekit-concurrency。

与 ekit 单体仓库的关系

  • 代码与 ekit v0.34.0 等价,module 路径 git.enjoye.top/enjoydream/ekit/... → github.com/yi-nology/ekit-data/...
  • 各子仓库独立发版(SemVer);开发规范沿用 ekit AGENTS.md 约定

License

见 LICENSE

Directories

Path Synopsis
data
cache
Package cache 提供泛型缓存门面。
Package cache 提供泛型缓存门面。
timertask
Package timertask 提供延迟任务队列门面。
Package timertask 提供延迟任务队列门面。

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL