Packages

CMDC Gateway — HTTP + SSE + WebSocket 协议网关,接入 CMDC Agent 能力

Current section

Files

Jump to
cmdc_gateway lib cmdc_gateway.ex
Raw

lib/cmdc_gateway.ex

defmodule CMDCGateway do
@moduledoc """
CMDC Gateway — HTTP + SSE + WebSocket 协议网关。
让任何语言的外部系统通过标准 HTTP 协议接入 CMDC Agent 能力。
## 启动
# 在 Application 中自动启动(默认端口 4000)
# 或手动配置:
config :cmdc_gateway,
port: 4000,
api_keys: %{"my-key" => "tenant-1"}
## 架构
外部系统 (Python / Node.js / 任意语言)
│ HTTP + SSE / WebSocket
CMDCGateway.Router → CMDC 核心库 (EventBus 驱动)
"""
@version Mix.Project.config()[:version]
@doc "返回 Gateway 版本号。"
@spec version() :: String.t()
def version, do: @version
end