Files
orbit/examples/http-service/README.md

12 lines
813 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 在现有 HTTP 服务中使用 Orbit
可运行的 Go 服务:HTTP 业务事务 → 公共 MySQL Outbox → Orbit → 内嵌 Worker → WebSocket 结果 → 业务 Inbox。
- [完整准备、运行、API、故障与退出说明](../../docs/examples/http-service.md)
- [业务路由与组件装配](cmd/server/main.go)
- [生命周期顺序](cmd/server/lifecycle.go)
- [业务事务](internal/jobs/store.go)
- [业务 Inbox 示例实现](internal/inbox/store.go),沿用独立 result-inbox 示例的事件去重与版本约束
`init` 创建业务库表;`provision` 用稳定身份创建结果订阅;`serve` 使用配置中的订阅 ID,启动时无需 Orbit 在线。默认只监听回环地址 127.0.0.1:8090。接入已有服务时挂载业务路由,并接入原有鉴权、监控及生命周期。