duan5362 2014-03-21 16:19
浏览 23
已采纳

将App Engine模块(以前的后端)映射到单独的Go程序

We are using App Engine and Go.

Google recently deprecated Backends in favor of Modules. Now, other than with Python or PHP, with Go for App Engine, you don't map URIs to Scripts. Instead, the pseudo script _go_app is used in app.yaml and URIs are routed to handlers by whatever routing mechanism you implement. The point is, the routing happens from within the compiled Go program.

I wonder, what this means for Modules.

Is there any way of mapping Modules to different Go programs? I'd love to keep the code separate.

Google's docs unfortunately or not of much help: https://developers.google.com/appengine/docs/go/modules/.

  • 写回答

1条回答 默认 最新

  • dongzaijiao4863 2014-03-21 23:14
    关注

    Yes - each module can be an entire separate codebase. You can even have each module use a different language. Each module will be able to access the same datastore of course.

    You need to make sure to setup your dispatch correctly to map requests to the correct module.

    The requests routed via the dispatch are then routed via the goapp registered urls. You will not be able to route requests from one go module to another inside of your default module without using the dispatch because all requests default to the main module.

    You can read more about routing requests between modules here: https://developers.google.com/appengine/docs/go/modules/routing

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 关于无人驾驶的航向角
  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥30 BC260Y用MQTT向阿里云发布主题消息一直错误
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了
  • ¥20 用雷电模拟器安装百达屋apk一直闪退