GoogleCloudPlatform / GoogleCloudPlatform/functions-framework-python

Possibility for multiple target/signature-type pairs?

未关闭
#269 0 条评论 0 个 reaction 已指派 1 人 已被 @janell-chen 认领 在 GitHub 查看
enhancement P4
主要语言
Python
星标
968
派生
128
PR 合并指标
30 天内没有已合并 PR

描述

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
```

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。