dsjbest2015 2017-03-18 04:09
浏览 32
已采纳

是否可以在GAE flex环境上使用appengine / datastore包?

There are two different datastore packages for Google App Engine: google.golang.org/appengine/datastore and cloud.google.com/go/datastore.

The documentation for the appengine/datastore package uses the standard environment while the documentation for the cloud package uses the flex environment.

I have a Go application which uses the appengine/datastore package on the standard GAE environment. If I want to migrate this application from the standard environment to the flex environment do I need to switch to the cloud.google.com/go/datastore package, or can I continue using the appengine/datastore package? If not, why not?

  • 写回答

1条回答 默认 最新

  • douliwang6896 2017-03-18 04:56
    关注

    You need to migrate to cloud.google.com/go/datastore.

    From Migrating Services from the Standard Environment to the Flexible Environment:

    The App Engine flexible environment does not provide the API libraries present in the App Engine SDK. If you decide to migrate your application from the App Engine standard environment to the flexible environment, you must update your code to use services and APIs that are available across all Google Cloud Platform environments.

    And from Cloud Datastore:

    You can access Google Cloud Datastore from anywhere using the Cloud Datastore API. Use the Google Cloud client libraries to store and retrieve data from Cloud Datastore.

    The same Cloud Datastore data is available regardless of if you use the App Engine libraries, the Google Cloud client libraries, or call the API directly.

    At this time ORM libraries that available in the standard environment such as ndb and Objectify are not supported outside of the standard environment.

    For more information, see the following guide:

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

报告相同问题?

悬赏问题

  • ¥15 如何让子窗口鼠标滚动独立,不要传递消息给主窗口
  • ¥15 如何能达到用ping0.cc检测成这样?如图
  • ¥15 关于#DMA固件#的问题,请各位专家解答!
  • ¥15 matlab生成的x1图不趋于稳定,之后的图像是稳定的水平线
  • ¥15 请问华为OD岗位的内部职业发展通道都有哪些,以及各个级别晋升的要求
  • ¥20 微信小程序 canvas 问题
  • ¥15 系统 24h2 专业工作站版,浏览文件夹的图库,视频,图片之类的怎样删除?
  • ¥15 怎么把512还原为520格式
  • ¥15 MATLAB的动态模态分解出现错误,以CFX非定常模拟结果为快照
  • ¥15 求高通平台Softsim调试经验