MCPcopy Create free account
hub / github.com/serverless/examples / chain

Function chain

openwhisk-node-chaining-functions/handler.js:3–12  ·  view source on GitHub ↗
(parameters)

Source from the content-addressed store, hash-verified

1'use strict';
2
3function chain(parameters) {
4 // eslint-disable-next-line global-require, import/no-extraneous-dependencies
5 const ow = require('openwhisk')();
6
7 const invoke = (actionName, params) => ow.actions.invoke({ actionName, params, blocking: true });
8 return invoke('my_service-dev-split', parameters)
9 .then(res => invoke('my_service-dev-reverse', res.response.result))
10 .then(res => invoke('my_service-dev-join', res.response.result))
11 .then(res => res.response.result);
12}
13
14module.exports.chain = chain;

Callers

nothing calls this directly

Calls 1

invokeFunction · 0.70

Tested by

no test coverage detected