Skip to content

Commit 4cef2b1

Browse files
committed
GH-422, GH-606 Update documentation page with initial Cloud Events documentation
Resolves #422 Resolves #606
1 parent 0a41333 commit 4cef2b1

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

docs/src/main/asciidoc/index.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ The reference documentation consists of the following sections:
99

1010
[horizontal]
1111
<<spring-cloud-function.adoc#,Reference Guide>> :: Spring Cloud Function Reference
12+
https://github.com/spring-cloud/spring-cloud-function/tree/master/spring-cloud-function-samples/function-sample-cloudevent[Cloud Events] :: Cloud Events
1213
<<aws.adoc#,AWS Adapter>> :: AWS Adapter Reference
1314
<<azure.adoc#, Azure Adapter>> :: Azure Adapter Reference
1415
<<gcp.adoc#, GCP Adapter>> :: GCP Adapter Reference
@@ -18,4 +19,3 @@ Relevant Links:
1819

1920
[horizontal]
2021
https://projectreactor.io/[Reactor] :: Project Reactor
21-
https://projectriff.io/[riff] :: Project riff

spring-cloud-function-samples/function-sample-cloudevent/README.adoc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,18 @@ The current example uses spring-cloud-function framework as its core which allow
55
their requirement while taking care-off non-functional aspects. For more information on Spring Cloud Function please visit
66
our https://spring.io/projects/spring-cloud-function[project page].
77

8-
The example provides dependencies and instructions to demonstrate several distinct invocation models:
8+
The example consists of a class https://github.com/spring-cloud/spring-cloud-function/blob/master/spring-cloud-function-samples/function-sample-cloudevent/src/main/java/io/spring/cloudevent/CloudeventDemoApplication.java[CloudeventDemoApplication]
9+
which contains a set of function beans of different type signatures which you can interact with following instructions below.
10+
11+
It also provides necessary dependencies and instructions to demonstrate several distinct invocation models:
912

1013
- _Direct function invocation_
1114
- _Function as a REST endpoint_
1215
- _Function as message handler (e.g., Kafka, RabbitMQ etc)_
1316
- _Function invocation via RSocket_
1417

15-
The POM file defines all the necessary dependency in a segregated way, so you can choose the one you're interested in.
18+
The POM file defines all the necessary dependency in a segregated way, so you can choose the one you're interested in by commenting in/out dependencies
19+
that fit your scenario (e.g., Streaming vs. REST, ect_
1620

1721
### Direct function invocation
1822

@@ -40,7 +44,7 @@ provides a good example on how to accomplish this.
4044
Given that SCF allows function to be exposed as REST endpoints, you can post cloud event to any of the
4145
functions by using function name as path (e.g., `localhost:8080/<function_name>`).
4246

43-
Just add this to your dependency
47+
Just add this to your dependency (or in your case simply un-comment)
4448

4549
[source, xml]
4650
----
@@ -90,6 +94,8 @@ curl -w'\n' localhost:8080/asString \
9094
}'
9195
----
9296

97+
Feel free to change the function you're invoking by changing URI path (e.g., `localhost:8080/asString` to `localhost:8080/consumeAndProduceCloudEventAsPojoToPojo`).
98+
9399
### Function as message handler (e.g., Kafka, RabbitMQ etc)
94100

95101
Streaming support for Apache Kafka and RabbitMQ is provided via https://spring.io/projects/spring-cloud-stream[Spring Cloud Stream] framework.

0 commit comments

Comments
 (0)