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 使用yolov5-7.0目标检测报错
  • ¥15 对于这个问题的解释说明
  • ¥200 询问:python实现大地主题正反算的程序设计,有偿
  • ¥15 smptlib使用465端口发送邮件失败
  • ¥200 总是报错,能帮助用python实现程序实现高斯正反算吗?有偿
  • ¥15 对于squad数据集的基于bert模型的微调
  • ¥15 为什么我运行这个网络会出现以下报错?CRNN神经网络
  • ¥20 steam下载游戏占用内存
  • ¥15 CST保存项目时失败
  • ¥20 java在应用程序里获取不到扬声器设备