GoogleCloudPlatform / GoogleCloudPlatform/functions-framework-nodejs
Expose an invoke function
- 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ả
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);
});
```
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách xem xét API functions.http công khai và hướng dẫn xác thực Google Cloud được liên kết, sau đó truy tìm nơi các API của framework được export. Công việc được xem là hoàn thành khi framework cung cấp hành vi functions.invoke được đề xuất cho các lệnh gọi liên hàm đã xác thực và xác minh hành vi đó bằng các bài kiểm thử phù hợp của dự á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, node.js, typescript
- Lĩnh vực
- backend-api-design, cloud
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100