00:02

Same function signature

Exactly the same async function signature.

function (ctx, data) {}

data: Request body data, parsed as JSON by default


Extensions
  • ctx.req: The pass-through Express standard HTTP request object
  • ctx.res: The pass-through Express standard HTTP response object
  • These two methods are optional for use, even no response made by ctx.res would NOT block the HTTP request handler

Specific signature type

New type openfunction ready to work.

  • OpenFunction Function CRD:
apiVersion: core.openfunction.io/v1beta1
kind: Function
metadata:
  name: func-name
spec:
  serving:
    # default to knative
    runtime: knative
    params:
      # default to http
      FUNCTION_SIGNATURE_TYPE: openfunction
  • CLI: --signature-type=openfunction
  • ENV: FUNCTION_SIGNATURE_TYPE=openfunction
current