Cloud 中的 Firestore 数据触发事件 运行

Firestore data trigger events in Cloud Run

使用 Cloud 时是否仍然可以获取 firestore 数据库触发器回调 运行?

目前有获取音频日志事件的选项,但没有找到在使用云 运行 时获取 firestore update/create/delete 触发器的方法。不过云函数有支持。

在我撰写本文时,Cloud 运行 的 Firestore 更改事件没有挂钩,这与您在 Cloud Functions 中看到的类似。这可能 change in the future with EventArc。它处于“预览”状态,尚未普遍可用。引自该博客:

With Eventarc, you can address key use cases ... by acting on events that originate from Cloud Storage, BigQuery, Firestore and more than 60 other Google Cloud sources.

同时,您可以编写一个简单的 Cloud Function Firestore trigger 来接收文档更改事件,并通过 pubsub 主题或 HTTP 请求将这些事件代理到云 运行。