简体   繁体   中英

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.

But does Google offer possibility to trigger an R function when a new file is uploaded to a bucket?

Thanks.

You should be able to do this using EventArc and Cloud Run, see Create a trigger for 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.

One other way to do this is less practical: Cloud Storage triggers with Cloud Functions. R isn't a supported runtime for Cloud Functions and so, while not impossible, I don't recommend this approach.

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.

I think (??) Eventarc is the strategic solution and recommend using that if you can.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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