In this directory you will find some example projects demonstrating different
features of the fn
Java FDK:
- Plain java code support (
string-reverse
) - Functional testing of your functions (
regex-query
andqr-code
) - Built-in JSON coercion (
regex-query
) - InputEvent and OutputEvent handling (
qr-code
)
This function takes a string and returns the reverse of the string.
The fn
Java FDK runtime will handle marshalling data into your
functions without the function having to have any knowledge of the FDK API.
This function takes a JSON object containing a text
field and a regex
field and return a JSON object with a list of matches in the matches
field. It demonstrates the builtin JSON support of the fn Java
wrapper (provided through Jackson) and how the platform handles serialisation
of POJO return values.
This function parses the query parameters of a GET request (through the
InputEvent
passed into the function) to generate a QR code. It demonstrates
the InputEvent
and OutputEvent
interfaces which provide low level
access to data entering the fn
Java FDK.
This example showcases the Fn Flow asynchronous execution API, by creating a workflow that takes an image and asynchronously generates three thumbnails for it, then uploads them to an object storage.