How can I have WebSockets connect to a Google Cloud Function?

Viewed 827
1 Answers

All trigger types for Cloud Functions are listed here: https://cloud.google.com/functions/docs/calling

Web Sockets are not directly supported as a trigger type.

The closest I can think of is setting up an architecture like this:

overview of the architecture

So here you have some code listening to the web socket and then triggering Cloud Functions through Pub/Sub or one of the other supported trigger types.

Related