Closed tanwww closed 3 years ago
@tanwww The easiest way is to copy-paste a backend from https://github.com/lithops-cloud/lithops/tree/master/lithops/serverless/backends. For example, you can copy the ibm_cf
backend, rename it to openfaas
, and then change the implementation of all the internal public methods. (you can delete all the private methods and create new ones if necessary)
As with the other backends, A new backend must have (at least) 3 files:
entry_point.py
: This file will go in the runtime to handle the incoming requests and run the functions.config.py
: Used to verify the user-provided config variables, and fill those that can be defaulted.openfaas.py
: Contains the logic to invoke the functions, and to create/build/delete the runtime@JosepSampe thanks for your reply, I'll try.
how to add a new backend , like openfaas