当前位置: 动力学知识库 > 问答 > 编程问答 >

go - Can you explain what the app engine context interface is?

问题描述:

I am contributing to a Go application where the appengine context interface is used a lot. I have come across a lot of documentation where the context is used as a variable. But I haven't yet found an explanation that I understand of exactly what the context is and what purpose it fills.

What is the go appengine context interface and what is its purpose?

网友答案:

Context in the paradigm of programming extends beyond just Go. You should take a look at this thread for a deeper explanation The term “Context” in programming?. In terms of App Engine it usually shares information about the request being made i.e. Initiating Server, Client IP, Errors, Timeouts, Is it in the background?, etc. You can take a look at the x/net/context package for some ideas of how Context can be used.

Hope this helps.

分享给朋友:
您可能感兴趣的文章:
随机阅读: