GoogleCloudPlatform / GoogleCloudPlatform/functions-framework-nodejs
Expose an invoke function
- Langage dominant
- TypeScript
- Étoiles
- 1.4k
- Forks
- 181
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
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);
});
```
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par examiner l’API publique functions.http et le guide d’authentification Google Cloud associé, puis identifiez où les API du framework sont exportées. Le travail est considéré comme terminé lorsque le framework expose le comportement functions.invoke proposé pour les appels authentifiés entre fonctions et vérifie ce comportement avec les tests appropriés du projet.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- google-cloud, node.js, typescript
- Domaine
- backend-api-design, cloud
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100