GoogleCloudPlatform / GoogleCloudPlatform/functions-framework-nodejs

Expose an invoke function

未关闭
#372 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
enhancement P3
主要语言
TypeScript
星标
1.4k
派生
181
PR 合并指标
30 天内没有已合并 PR

描述

Currently configuring the credentials necessary to invoke another function [requires a lot of boilerplate code](https://cloud.google.com/functions/docs/securing/authenticating#generating_tokens_manually) that is difficult to get right. We could easily expose a method in the functions framework that implements this. Proposed API:

```
import * as functions from '@googelcloud/functions-framework';

functions.http('Foo', (req, res) => res.send('hello!');

functions.http('Bar', async (req, res) => {
const result = await functions.invoke('my-project', 'Foo', {some: 'payload'});
res.send(result);
});
```

贡献指南

打开贡献指南

调研方向

首先检查公开的 functions.http API 和链接的 Google Cloud 身份验证指南,然后追踪 framework API 在哪里导出。完成的标准是 framework 为经过身份验证的跨函数调用提供所提议的 functions.invoke 行为,并通过适当的项目测试验证该行为。

由索引模型根据 Issue 内容生成。

评估

技术栈
google-cloud, node.js, typescript
领域
backend-api-design, cloud
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

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