[英]Trigger an R function from Google storage bucket?
From this link https://code.markedmondson.me/googleCloudRunner/articles/usecase-r-event-driven-pubsub.html , it's possible to trigger an R function from pub/sub.通过此链接https://code.markedmondson.me/googleCloudRunner/articles/usecase-r-event-driven-pubsub.html ,可以从 pub/sub 触发 R function。
But does Google offer possibility to trigger an R function when a new file is uploaded to a bucket?但是,当新文件上传到存储桶时,Google 是否提供触发 R function 的可能性?
Thanks.谢谢。
You should be able to do this using EventArc and Cloud Run, see Create a trigger for Cloud Run .您应该能够使用 EventArc 和 Cloud Run 执行此操作,请参阅为 Cloud Run 创建触发器。
NOTE Cloud Run supports any runtime (that you can containerize) and -- although opinionated (constrained set of runtime versions), Cloud Functions next generation (
gen2
) creates Cloud Run services.注意Cloud Run 支持任何运行时(您可以将其容器化),并且——尽管固执己见(受限的运行时版本集),但下一代 Cloud Functions (gen2
) 创建了 Cloud Run 服务。
One other way to do this is less practical: Cloud Storage triggers with Cloud Functions.另一种不太实用的方法是:使用 Cloud Functions触发 Cloud Storage 。 R isn't a supported runtime for Cloud Functions and so, while not impossible, I don't recommend this approach. R 不是 Cloud Functions 支持的运行时,因此虽然并非不可能,但我不推荐这种方法。
There are probably others, GCP's eventing is confusing and my take is that Google's supporting different approaches for customer continuity reasons and doesn't provide clear guidance on the best solutions for "green field" applications.可能还有其他原因,GCP 的事件令人困惑,我的看法是 Google 出于客户连续性的原因支持不同的方法,并且没有为“绿色领域”应用程序的最佳解决方案提供明确的指导。
I think (??) Eventarc is the strategic solution and recommend using that if you can.我认为(??) Eventarc是战略解决方案,如果可以的话,建议使用它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.