GoogleCloudPlatform / GoogleCloudPlatform/functions-framework-python

Possibility for multiple target/signature-type pairs?

Đang mở
#269 0 bình luận 0 reaction 1 người được giao Được @janell-chen nhận Xem trên GitHub
enhancement P4
Ngôn ngữ chính
Python
Star
968
Fork
128
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hello!

First of all, thanks for a great framework!

I have a question. You can specify the target and the signature type when running the `functions-framework` as such:

```
functions-framework --target=my_endpoint --signature-type=cloud-event
```

Is it possible to specify two different targets, with different signature-types?

Assuming I have the following code:

```python
import functions_framework

@functions_framework.http
def my_http_endpoint(request):
return "Hello world!"

@functions_framework.cloud_event
def my_event_endpoint(cloud_event):
return "Hello world!"
```

For instance by specifying multiple pairs:

```
functions-framework --target=my_event_endpoint --signature-type=cloud-event --target=my_http_endpoint --signature-type=http
```

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

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

Đánh giá

Issue này chưa được đánh giá.

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.