NodeJS What is my current Google Cloud Function Name?

十年热恋 提交于 2020-06-17 09:13:07

问题


I want to use the name of the current Google Cloud Function to drive some logic. How do I determine what my Google Cloud Function name is?


回答1:


According with this page, there is a set of environment variable automatically set on Cloud Function.

Select the right one according with your language runtime

  • FUNCTION_NAME in nodeJS 6 or 8
  • K_SERVICE in nodeJS10+


来源:https://stackoverflow.com/questions/62388694/nodejs-what-is-my-current-google-cloud-function-name

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!