airflow.contrib.hooks.openfaas_hook

Module Contents

airflow.contrib.hooks.openfaas_hook.OK_STATUS_CODE = 202[source]
class airflow.contrib.hooks.openfaas_hook.OpenFaasHook(function_name=None, conn_id='open_faas_default', *args, **kwargs)[source]

Bases:airflow.hooks.base_hook.BaseHook

Interact with Openfaas to query, deploy, invoke and update function

Parameters
  • function_name – Name of the function, Defaults to None

  • conn_id (str) – openfass connection to use, Defaults to open_faas_default for example host : http://openfaas.faas.com, Conn Type : Http

GET_FUNCTION = /system/function/[source]
INVOKE_ASYNC_FUNCTION = /async-function/[source]
DEPLOY_FUNCTION = /system/functions[source]
UPDATE_FUNCTION = /system/functions[source]
get_conn(self)[source]
deploy_function(self, overwrite_function_if_exist, body)[source]
invoke_async_function(self, body)[source]
update_function(self, body)[source]
does_function_exist(self)[source]