GoogleCloudPlatform / GoogleCloudPlatform/functions-framework-nodejs

Receive CloudEvent and URL query parameters

Đang mở
#606 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
P3 question
Ngôn ngữ chính
TypeScript
Star
1.4k
Fork
181
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

CloudEvent signature type function is really useful.

I'm working on build a flow as below.
```
Pub/Sub topic A -> Eventarc A -v
Pub/Sub topic B -> Eventarc B ---> Function
Pub/Sub topic C -> Eventarc C -^
```
I would like to receive CloudEvents from several topics in the same Function instance and adjust the processing somewhat for each topic.

Eventarc allows to specify a service URL path when invoking a destination Function. So, I adjust the behavior of Function to fit the Pub/Sub Topic by using URL query parameters like `/?mailTo=foo@example.com`, `/?mailTo=bar@example.com` and so on.
This service URL path can be easily edited from the Cloud Console for ease of operation.

The current CloudEvent signature Function does not seem to have a way to obtain URL query parameters.
So I use the http signature type Function and unmarshall the Pub/Sub message and control the http response myself.

If we can use URL query parameters in CloudEvent signature type, we can build a more convenient and flexible system.
Is there a way to recieve URL query parameters in CloudEvent signature Function?
Or is there another better way?

Thanks.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Issue không nêu tên tệp hay bài kiểm thử nào. Hãy bắt đầu bằng việc lần theo cách xử lý các yêu cầu chữ ký CloudEvent trong functions-framework-nodejs và xác định xem các tham số truy vấn URL có được cung cấp hay không; công việc được xem là hoàn tất khi có một cách đã được lập tài liệu và kiểm thử để truy cập chúng, hoặc một phương án thay thế được maintainer xác nhận.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
google-cloud, nodejs, typescript
Lĩnh vực
api, backend, cloud
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.