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
<https://www.linkedin.com/company/responserack> | Facebook
<https://facebook.com/Responserack> | Twitter
<https://twitter.com/Responserack>

-- 
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/CAMT-FFLT0srzczd56LmM_fSMAktDuc8Dj0kRisdvppPrk5mN5g%40mail.gmail.com.
  • [google-appe... Adam Jack
    • [google... Adam Jack
      • [go... 'Manpreet Sidhu (Google Cloud Support)' via Google App Engine

Reply via email to