Skip to content

Commit

Permalink
Merge pull request quarkusio#21969 from loicmathieu/funqy-doc
Browse files Browse the repository at this point in the history
Improve funqy doc
  • Loading branch information
geoand authored Dec 7, 2021
2 parents fd5432f + fa9c1b9 commit 32c2277
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/funqy-knative-events.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ There are two things to notice about this function. One, it has no output. You
required to return output. Second, there is an additional `event` parameter to the function.

If you want to know additional information about the incoming Cloud Event, you can inject the
`CloudEvent` interface using the Funqy `@Context` annotation. The `CloudEvent` interface exposes information
`io.quarkus.funqy.knative.events.CloudEvent` interface using the Funqy `@Context` annotation. The `CloudEvent` interface exposes information
about the triggering event.

[source, java]
Expand Down
7 changes: 4 additions & 3 deletions docs/src/main/asciidoc/funqy.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ include::./attributes.adoc[]
:extension-status: preview

Quarkus Funqy is part of Quarkus's serverless strategy and aims to provide a portable Java API to write functions
deployable to various FaaS environments like AWS Lambda, Azure Functions, Knative, and Knative Events (Cloud Events). It is also
usable as a standalone service.
deployable to various FaaS environments like AWS Lambda, Azure Functions, Google Cloud Functions, Knative, and Knative Events (Cloud Events).
It is also usable as a standalone service.

Because Funqy is an abstraction that spans multiple different cloud/function providers
and protocols it has to be a very simple API and thus, might not have all the features you are used
Expand Down Expand Up @@ -145,13 +145,14 @@ contextual information that is specific to the environment you are deploying in.
NOTE: We do not recommend injecting contextual information specific to a runtime. Keep your functions portable.

Contextual information is injected via the `@Context` annotation which can be used on a function parameter
or a class field. A good example is the `CloudEvent` interface that comes with our Funqy
or a class field. A good example is the `io.quarkus.funqy.knative.events.CloudEvent` interface that comes with our Funqy
Knative Cloud Events integration:

[source, java]
----
import io.quarkus.funqy.Funq;
import io.quarkus.funqy.Context;
import io.quarkus.funqy.knative.events.CloudEvent;
public class GreetingFunction {
Expand Down

0 comments on commit 32c2277

Please sign in to comment.