Make it deployable via its maven coordinates in spring-cloud-function-deployer (it is deployed by default on start up right now, but that's just a demo)
43 lines
951 B
Plaintext
43 lines
951 B
Plaintext
== Register a Function:
|
|
|
|
----
|
|
./registerFunction.sh -n uppercase -f "f->f.map(s->s.toString().toUpperCase())"
|
|
----
|
|
|
|
== Run a Stream Processing Microservice using that Function:
|
|
|
|
----
|
|
./stream.sh -i words -o uppercaseWords -f uppercase
|
|
----
|
|
|
|
== Run a REST Microservice using that Function:
|
|
|
|
----
|
|
./web.sh
|
|
curl -H "Content-Type=text/plain" localhost:8080/uppercase -d foo
|
|
----
|
|
|
|
== Compose Functions:
|
|
|
|
(assuming the `uppercase` function was already registered as above)
|
|
|
|
----
|
|
./registerFunction.sh -n pluralize -f "f->f.map(s->s+\"S\")"
|
|
|
|
curl -H "Content-Type=text/plain" localhost:8080/uppercase,pluralize -d foo
|
|
----
|
|
|
|
== Run a Task Microservice using a Supplier, Function, and Consumer:
|
|
|
|
(assuming the `uppercase` function was already registered as above)
|
|
|
|
----
|
|
./registerSupplier.sh -n words -f "()->Flux.just(\"foo\",\"bar\")"
|
|
|
|
./registerConsumer.sh -n print -f "System.out::println"
|
|
|
|
./task.sh -s words -f uppercase -c print
|
|
----
|
|
|
|
(more docs soon)
|