anthropos-gateway

    moonanthos
    faas
    http
    gateway
    Download zip
    Author
    Version
    0.3.3
    License
    Apache-2.0
    Last updated
    3 days ago
    Downloads
    175

    #anthropos-gateway——moonanthos FaaS 网关

    HTTP 触发面(A1-0):POST /eval body=moonanthos 源码 → MoonBit 网关编译(lang)→ rpc 推靶机(anthropos_target exec 面) → JSON 回执。崩溃也回完整现场(Class:Reason:Stack)。

    #用法

    anthropos_target/bin/start.sh # 起靶机(常驻) moonx thy1016/anthropos-gateway # 起网关(:7990) curl -X POST localhost:7990/eval -d 'fn go() { 6 * 7 }' # → {"ok":true,"result":"42"} curl -X POST localhost:7990/eval -d 'fn go() { hd([]) }' # → {"ok":false,"crash":"exec 崩溃现场: {error, badarg, [{erlang,hd,... curl localhost:7990/health # → {"ok":true,"gateway":"0.1.0"}

    #架构

    编译器与门面同居(MoonBit)——HTTP 收到源码后进程内 parse+desugar, rpc 一跳推靶机 exec。每请求独立连接(gwN 计数)。

    GwConn

    type GwConn

    连接三元组(每请求独立 gwN——epmd 残留拒)

    GwRpcPort

    type GwRpcPort

    Source Files