[google-appengine] Re: Migrating from Go on GAE to Go on GAE using Google App Engine Go library...

2020-07-01 Thread Adam Jack
For completeness, as I wandered in the wilderness confused I stumbled upon 
this:

  
 
https://cloud.google.com/appengine/docs/standard/go/go-differences#migrating-appengine-sdk

... and I believe the answer to my question is *don't* do what I was 
attempting, instead skip the Google App Engine SDK (as a thing of the past) 
and go to Google Cloud APIs.

regards

Adam

On Saturday, June 27, 2020 at 6:33:24 PM UTC-6 Adam Jack wrote:

> Hello,
>
> I've been using GAE for a number of months running a go webapp (pretty 
> vanilla HTTP with a Gorilla MUX.) It has been working well. I've recently 
> started to want to access some of the GAE services and so am trying to 
> start to use the GAE go library. I also want to be able to develop offline 
> ('cos I often work where networks are poor.)
>
> I cannot seem to get my head around reworking my environment to succeed. 
> When I make GAE calls (e.g. to memcache) I get told "not an App Engine 
> context".
>
> I've tried reading documentation and Googling but I cannot seem to find 
> the pattern of setup I am missing, if one exists. Maybe I've painted myself 
> into a corner somehow.
>
> I've tried wrapping/replacing my context.Context via 
> appengine.WithContext, and my HTTP request. That said, I continue to get 
> the same error message.
>
> I tried calling appengine.Main (as some search results suggested) in my 
> main but things just hung badly. I don't know how to refactor to support 
> that entry point, but maybe I need to learn.
>
> Hmmm, reading the code comment inside appengine.Main I see a new path to 
> try, refactor so that when running on GAE the code sets up http handlers 
> (somehow) and dives into appengine.Main, and when not in GAE it runs my own 
> HTTP server. I think I can try that. Does anybody know of a code example I 
> can see to emulate?
>
> Further question ... once I am, in appengine.Main will all contexts I get 
> (from the HTTP requests) be ok for me to with.Context wrapper, to store my 
> own values? (I've read some older postings that this breaks the appengine 
> context.)
>
> Any pointers would be really helpful. I've googled and found "Getting 
> Started" and such, and some migration docs, but I'm starting to feel I'm 
> unintentionally following an uncommon path.
>
> BTW: Separately, it seems that memcache works on standard but not flex 
> (hopefully that is correct) which makes me think maybe memcache isn't a 
> good solution for long term. Is it deprecated in favor of something 
> else, or what?
>
> Thanks in advance for any suggestions.
>
> regards,
>
> Adam
> -- 
> Responserack
> - incidents happen, response is crafted...
> https://www.responserack.com | LinkedIn 
>  | Facebook 
>  | Twitter 
> 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/11d91a40-70ab-43dd-9e91-e7678b404a3fn%40googlegroups.com.


[google-appengine] Re: Migrating from Go on GAE to Go on GAE using Google App Engine Go library...

2020-07-03 Thread 'Manpreet Sidhu (Google Cloud Support)' via Google App Engine
Thanks for reaching out!

It seems as though you have resolved your question, and that’s great! The 
fact that you came back and posted your solution is great. This will allow 
others who face the same issue to be able to resolve their issue.

Regarding your query about Memcache, it is not deprecated, but simply just not 
available for the App Engine Flex environment 
. 
For a list of all deprecations, please consult this document 
.

This type of question is best suited for Stack Overflow as those channels 
specialize in answering Technical Questions. Google Groups are best suited 
for product discussions, release notes and service status updates. More 
details regarding our community support can be found here 
.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/e404200e-a629-4525-897a-237e8e4e6953o%40googlegroups.com.