Skip to content

Bootstrap a cloud function

Lahiru Pathirage edited this page Aug 6, 2020 · 4 revisions

<<< Bootstrap a gostep project

Now you are ready initiate a cloud function. Gostep treats an individual cloud function as a service.

To initiate simply do, gostep service init <CLOUD_FUNCTION_NAME> env <RUNTIME> trigger <FUNCTION_EXECUTION_TYPE/INVOKER_TYPE>
Use allow-all keyword to set cloud function invoking to public.

  • Available environments for env are "java/plain", "java/spring", "python", "nodejs"
  • Available invoke types are "http", "pubsub", "storage"

For pubsub and storage invoking types please refer and configure 'eventTrigger' settings in function.json. For further explanations please refer Google cloud function resource object.

This will initiate your functions in <YOUR_WORKSPACE_DIR>/src directory. Now you can implement the business logic in the bootstrapped gostep service and deploy it.

>>> Deploy cloud functions

Clone this wiki locally