GitRead 中文社区
首页趋势排行榜原创文章严选周刊
更多资源
新手训练营
精选专题热门话题GitHub 文档资源精选实战指南

eventhorizon

Event Sourcing for Go!

  • 语言Go
  • 默认分支main
  • 大小2.3 MB
  • 更新9月2日
  • Issues38
在 GitHub 打开
avatarlooplab

项目介绍

looplab/eventhorizon 是一个托管在 GitHub 上的开源项目,主要使用 Go 编写,采用 Apache License 2.0 许可证,目前获得 1.7k 个 Star、192 次 Fork。

仓库全名
looplab/eventhorizon

README 摘要

Event Horizon Event Horizon is a CQRS/ES toolkit for Go. NOTE: Event Horizon is used in production systems but the API is not final! CQRS stands for Command Query Responsibility Segregation and is a technique where object access (the Query part) and modification (the Command part) are separated from each other. This helps in designing complex data models where the actions can be totally independent from the data…

完整内容见 GitHub 原始 README 或本页 。

常见问题

eventhorizon 用什么语言开发?

主要使用 Go 编写,采用 Apache License 2.0 许可证,目前有 1.7k 个 Star。

eventhorizon 可以免费商用吗?

仓库采用 Apache License 2.0 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 eventhorizon 的源码?

可以直接克隆仓库:git clone https://github.com/looplab/eventhorizon.git,默认分支为 main;安装与运行步骤见仓库 README。

eventhorizon 最近还在维护吗?

仓库最近一次更新为 9月2日,当前有 38 个未关闭 Issue;Star 数为 1.7k,可作为社区活跃度的参考。

本页面展示项目元数据与原始 README,GitRead 中文社区 编辑团队负责选题收录。

相关仓库

avelino/awesome-go avatar
awesome-goavelino
4 天前
193.1k
13.7k
118

一份精选的 Go 框架、库和软件列表

golanggolang-librarygo+3
Go
12.5 MB
0
详情
ollama/ollama avatar
ollamaollama
15 小时前
186.5k
18.6k
2.6k

快速上手并运行 Kimi、GLM、MiniMax、DeepSeek、gpt-oss、Qwen、Gemma 及其他模型。

deepseekgemmaglm+11
Go
94.9 MB
1
详情
golang/go avatar
gogolang
2 小时前
139.8k
20.2k
9.9k

Go 编程语言

gogolanglanguage+1
Go
456.8 MB
0
详情
kubernetes/kubernetes avatar
kuberneteskubernetes
2 小时前
129.0k
45.1k
3.3k

生产级容器调度与管理

cncfcontainersgo+1
Go
1.5 GB
0
详情
JuliusBrussee/caveman avatar
cavemanJuliusBrussee
1 天前
118.8k
6.9k
56

为什么几个 token 能搞定却要用很多 token。一个爆火的技能 + 编码代理的代理,像穴居人那样说话,可削减 65% 的 token。

aianthropiccaveman+7
Go
21.2 MB
0
详情
fatedier/frp avatar
frpfatedier
8 小时前
110.5k
15.0k
34

一个快速的反向代理,帮助你将 NAT 或防火墙后的本地服务器暴露到互联网。

proxyreverse-proxytunnel+7
Go
32.4 MB
0
详情
infiniflow/ragflow avatar
ragflowinfiniflow
4 小时前
94.0k
11.2k
817

RAGFlow 是一款领先的开源检索增强生成(RAG)引擎,将前沿 RAG 与 Agent 能力融合,为 LLM 构建卓越的上下文层

agent-harnessagent-native-databaseagentic-ai+13
Go
187.7 MB
0
详情
gohugoio/hugo avatar
hugogohugoio
2 小时前
90.4k
8.3k
177

世界上用于构建网站的最快框架。

gohugostatic-site-generator+4
Go
150.1 MB
0
详情

关于

awscqrsddddomain-driven-designentityevent-horizonevent-sourcingeventsourcinggogoogle-cloudjetstreamkafkamongodbnatsopentracingredis
  • Apache License 2.0
  • 1.7k Stars
  • 192 Forks
  • 43 Watching

简要分析

热度分
2108
价值分
1068
活跃状态
活跃
GitHub

语言占比

Go
Makefile
Nix
Shell

Release

  • v0.17.06月16日
  • v0.16.0: Snapshots and more2022年12月23日
  • v0.15.5: Fix to register tracing context manually2021年12月14日
  • v0.15.4: Fix command handling cancelation2021年12月6日
  • v0.15.3: Fix missing event in Redis event bus error2021年12月3日

贡献者

maxekmanmaxekmanklowdoklowdomavogelmavogelmcarrieremcarriereMaxBreidaMaxBreidaJensRantilJensRantildependabot[bot]dependabot[bot]JohnRoeslerJohnRoeslersemenovDLsemenovDLhaderach75haderach75qzioqziobalboahbalboah

PkgGoDev Build Status Coverage Status Go Report Card

Event Horizon

Event Horizon is a CQRS/ES toolkit for Go.

NOTE: Event Horizon is used in production systems but the API is not final!

CQRS stands for Command Query Responsibility Segregation and is a technique where object access (the Query part) and modification (the Command part) are separated from each other. This helps in designing complex data models where the actions can be totally independent from the data output.

ES stands for Event Sourcing and is a technique where all events that have happened in a system are recorded, and all future actions are based on the events instead of a single data model. The main benefit of adding Event Sourcing is traceability of changes which can be used for example in audit logging. Additionally, “incorrect” events that happened in the past (for example due to a bug) can be compensated for with an event which will make the current data “correct”, as that is based on the events.

Read more about CQRS/ES from one of the major authors/contributors on the subject: http://codebetter.com/gregyoung/2010/02/16/cqrs-task-based-uis-event-sourcing-agh/

Other material on CQRS/ES:

  • http://martinfowler.com/bliki/CQRS.html
  • http://cqrs.nu
  • https://groups.google.com/forum/#!forum/dddcqrs

Inspired by the following libraries/examples:

  • https://github.com/edumentab/cqrs-starter-kit
  • https://github.com/pjvds/go-cqrs
  • http://www.codeproject.com/Articles/555855/Introduction-to-CQRS
  • https://github.com/qandidate-labs/broadway

Suggestions are welcome!

Usage

See the example folder for a few examples to get you started.

Get Involved

  • Join our slack channel (sign up here)
  • Check out the contribution guidelines

Event Store Implementations

Official

  • Memory - Useful for testing and experimentation.
  • MongoDB - One document per aggregate with events as an array. Beware of the 16MB document size limit that can affect large aggregates.
  • MongoDB v2 - One document per event with an additional document per aggregate. This event store is also capable of keeping track of the global event position, in addition to the aggregate version.
  • Recorder - An event recorder (middleware) that can be used in tests to capture some events.
  • Tracing - Adds distributed tracing support to event store operations with OpenTracing.

Contributions / 3rd party

  • AWS DynamoDB: https://github.com/seedboxtech/eh-dynamo
  • Postgress: https://github.com/giautm/eh-pg
  • Redis: https://github.com/TerraSkye/eh-redis
  • ScyllaDB: https://github.com/datdao/eh-scylla

Event Bus Implementations

Official

  • GCP Cloud Pub/Sub - Using one topic with multiple subscribers.
  • NATS - Using Jetstream features.
  • Kafka - Using one topic with multiple consumer groups.
  • Local - Useful for testing and experimentation.
  • Redis - Using Redis streams.
  • Tracing - Adds distributed tracing support to event publishing and handling with OpenTracing.

Contributions / 3rd party

  • Kafka: https://github.com/Kistler-Group/eh-kafka
  • NATS Streaming: https://github.com/v0id3r/eh-nats

Repo Implementations

Official

  • Memory - Useful for testing and experimentation.
  • MongoDB - One document per projected entity.
  • Version - Adds support for reading a specific version of an entity from an underlying repo.
  • Cache - Adds support for in-memory caching of entities from an underlying repo.
  • Tracing - Adds distributed tracing support to an repo operations with OpenTracing.

Development

To develop Event Horizon you need to have Docker and Docker Compose installed.

To run all unit tests:

make test

To run and stop services for integration tests:

make run
make stop

To run all integration tests:

make test_integration

Testing can also be done in docker:

make test_docker
make test_integration_docker

License

Event Horizon is licensed under Apache License 2.0

http://www.apache.org/licenses/LICENSE-2.0

评论

登录 后发表评论
暂无评论
GitRead 中文社区
深度解读 · 趋势洞察 · 价值精选

关于

关于我们联系我们编辑准则收录标准赞赏人员

发现

技术趋势新手训练营资源精选实战指南精选专题热门话题GitHub 文档

条款

隐私政策服务条款网站地图
26.9万收录项目
5.8万中文话题
155精选专题
发现技术价值,连接开源智慧
© 2026 GitRead · GitHub 中文社区 本站与 GitHub, Inc. 无隶属关系;GitHub 是 GitHub, Inc. 的商标。