简体   繁体   English

GCP 云函数助手

[英]GCP Cloud Functions helpers

Assume we're deploying GCP Cloud Functions from a GitHub repo (mirrored via GCP Source Repositories).假设我们从 GitHub 存储库(通过 GCP 源存储库镜像)部署 GCP 云功能。 Is it possible to set up shared code that can be accessed by both functions below?是否可以设置下面两个函数都可以访问的共享代码? (eg via helpers.py ). (例如通过helpers.py )。

helpers.py
function_one/
├── main.py
function_two/
├── main.py

Not exactly, since each function is a separate entity.不完全是,因为每个 function 都是一个单独的实体。 But you could move your helpers.py to its own repository, then import the repository within each individual function.但是你可以将你的 helpers.py 移动到它自己的存储库中,然后在每个单独的 function 中导入存储库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM