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:

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

报告相同问题?

悬赏问题

  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用
  • ¥15 微信小程序协议怎么写
  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害