英文:
Are Cloud Endpoints with Go Google App Engine Standard possible?
问题
我已经在Google App Engine标准环境中使用Go实现了一个简单的API,只需使用以下代码:
func init() {
http.HandleFunc("/api/v1/resource", submitResource)
}
没有什么特别的。然而,我想将这段代码改为使用Cloud Endpoints,以便获得更好的监控和诊断功能。
在标准实例中是否可能实现这一点,还是必须转向弹性实例?
我找不到任何关于这个的文档。也没有找到这个看似简单的问题的答案。目前,我有点后悔选择了Python,因为它的支持似乎更成熟。我选择Go是因为我的初步研究表明Go在API类似的代码中提供了更好的性能。
如果可能的话,请问有什么指导方针吗?
英文:
I have implemented a simple API in Go on Google App Engine Standard using just:
func init() {
http.HandleFunc("/api/v1/resource",submitResource)
}
Nothing special. However I want to port this code to using Cloud Endpoints instead in order to get the better monitoring and diagnostics.
Is it even possible with STANDARD instances or must I move to FLEXIBLE?
I can't find any documentation on this. Nor answers to this seemingly simple question. At the moment I half wish I had chosen Python because its support seems more mature. I chose Go because it seems more appropriate for API-like code because my minimal research suggested Go offered better performance.
If it is possible, are there any pointers to how please?
答案1
得分: 2
只有Python和Java可以通过Endpoints Framework在GAE标准环境中使用。然而,Go语言可以在GAE灵活环境中使用。
这是Go语言在GAE灵活环境中的示例:
https://github.com/GoogleCloudPlatform/golang-samples/tree/master/endpoints/getting-started
英文:
Only Python and Java are supported on GAE Standard via the Endpoints Frameworks. However, Go is supported on GAE Flexible.
Here is the Go GAE Flexible sample:
https://github.com/GoogleCloudPlatform/golang-samples/tree/master/endpoints/getting-started
答案2
得分: 2
经过大量的研究和试错,简单的答案是“不可以”-截至2016年12月。
更详细的答案是,如果你愿意花费过多的精力来创建最新的库,那么可能是可以的。目前,即使是处于alpha阶段,也没有对使用Go和Google App Engine Standard的当前Google Cloud Endpoints提供基本支持。
英文:
After much research and trial and error, the simple answer is "No." - as of Dec 2016.
The longer answer is it's possible if you want to put far too much effort into making up to date libraries of your own. There is basically no support, even in alpha, for the current Google Cloud Endpoints using Go with Google App Engine Standard.
答案3
得分: 1
可以在GAE标准环境中运行Go+endpoints,但是库可能已经过时了。
可以在github上找到库和示例应用程序:
https://github.com/GoogleCloudPlatform/go-endpoints
我已经成功部署了一个名为"Greetings"的AppEngine SE应用程序,它可以正常工作。
英文:
It's possible to run Go+endpoints on GAE Standard environment, however libraries might be outdated now.
Libraries and sample app can be found on github:
https://github.com/GoogleCloudPlatform/go-endpoints
I have successfully deployed "Greetings" as AppEngine SE app, and it works.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论