Are Cloud Endpoints with Go Google App Engine Stan

2019-08-02 09:34发布

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?

3条回答
甜甜的少女心
2楼-- · 2019-08-02 09:53

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

查看更多
来,给爷笑一个
3楼-- · 2019-08-02 10:05

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.

查看更多
一纸荒年 Trace。
4楼-- · 2019-08-02 10:14

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.

查看更多
登录 后发表回答