Skip to content

Commit 194a966

Browse files
committed
Google Cloud Function gen 2 is now the default
1 parent a14d4c7 commit 194a966

File tree

3 files changed

+3
-23
lines changed

3 files changed

+3
-23
lines changed

docs/src/main/asciidoc/funqy-gcp-functions.adoc

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ In this example, we will create two background functions and a cloud events func
8181
Background functions allow you to react to Google Cloud events like PubSub messages, Cloud Storage events, Firestore events, ...
8282
Cloud events functions allow you to react to supported events using the Cloud Events specification.
8383

84-
NOTE: Quarkus supports Cloud Functions gen 1 and gen 2. For an overview of Cloud Functions gen 2 see https://cloud.google.com/functions/docs/2nd-gen/overview[this page] on the Google Cloud Functions documentation. To use gen 2 you must add the `--gen2` parameter.
85-
8684
[source,java]
8785
----
8886
import jakarta.inject.Inject;
@@ -231,8 +229,6 @@ You can also simply add a file to Cloud Storage using the command line of the we
231229

232230
=== Cloud Events Functions - Cloud Storage
233231

234-
WARNING: Cloud Events Function is a feature of Cloud Functions gen 2 only.
235-
236232
Before deploying your function, you need to create a bucket.
237233

238234
[source,bash]
@@ -244,7 +240,7 @@ Then, use this command to deploy to Google Cloud Functions:
244240

245241
[source,bash]
246242
----
247-
gcloud functions deploy quarkus-example-cloud-event --gen2 \
243+
gcloud functions deploy quarkus-example-cloud-event \
248244
--entry-point=io.quarkus.funqy.gcp.functions.FunqyCloudEventsFunction \
249245
--runtime=java21 --trigger-bucket=example-cloud-event --source=target/deployment
250246
----
@@ -324,8 +320,6 @@ This will call your PubSub background function with a Cloud Storage event `{"nam
324320

325321
=== Cloud Events Functions - Cloud Storage
326322

327-
WARNING: Cloud Events Function is a feature of Cloud Functions gen 2 only.
328-
329323
For cloud events functions, you launch the invoker with a target class of `io.quarkus.funqy.gcp.functions.FunqyCloudEventsFunction``.
330324

331325
[source,bash,subs="attributes"]
@@ -457,8 +451,6 @@ class GreetingFunctionsStorageTest {
457451

458452
=== Cloud Events Functions - Cloud Storage
459453

460-
WARNING: Cloud Events Function is a feature of Cloud Functions gen 2 only.
461-
462454
[source,java]
463455
----
464456
import static io.restassured.RestAssured.given;

docs/src/main/asciidoc/gcp-functions-http.adoc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,11 @@ one for Reactive routes and one for xref:funqy-http.adoc[Funqy HTTP].
6363
[NOTE]
6464
====
6565
These various endpoints are for demonstration purposes.
66-
For real life applications, you should choose one of this technology and stick to it.
66+
For real life applications, you should choose one of these technologies and stick to it.
6767
====
6868

6969
If you don't need endpoints of each type, you can remove the corresponding extensions from your `pom.xml`.
7070

71-
NOTE: Quarkus supports Cloud Functions gen 1 and gen 2. For an overview of Cloud Functions gen 2 see https://cloud.google.com/functions/docs/2nd-gen/overview[this page] on the Google Cloud Functions documentation. To use gen 2 you must and add the `--gen2` parameter.
72-
7371
=== The Jakarta REST endpoint
7472

7573
[source,java]

docs/src/main/asciidoc/gcp-functions.adoc

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ gcloud auth login
5858
For this example project, we will create four functions, one `HttpFunction`, one `BackgroundFunction` (Storage event),
5959
one `RawBackgroundFunction` (PubSub event) and one `CloudEventsFunction` (storage event using the Cloud Events specification).
6060

61-
NOTE: Quarkus supports Cloud Functions gen 1 and gen 2. For an overview of Cloud Functions gen 2 see https://cloud.google.com/functions/docs/2nd-gen/overview[this page] on the Google Cloud Functions documentation. To use gen 2 you must add the `--gen2` parameter.
62-
6361
== Choose Your Function
6462

6563
The `quarkus-google-cloud-functions` extension scans your project for a class that directly implements the Google Cloud `HttpFunction`, `BackgroundFunction`, `RawBackgroundFunction` or `CloudEventsFunction` interface.
@@ -193,8 +191,6 @@ public class RawBackgroundFunctionPubSubTest implements RawBackgroundFunction {
193191

194192
=== The CloudEventsFunction
195193

196-
WARNING: `CloudEventsFunction` is a feature of Cloud Functions gen 2 only.
197-
198194
This `CloudEventsFunction` is triggered by a Cloud Events Storage event, you can use any Cloud Events supported by Google Cloud instead.
199195

200196
[source,java]
@@ -332,14 +328,12 @@ gcloud functions call quarkus-example-pubsub --data '{"data":{"greeting":"world"
332328

333329
=== The CloudEventsFunction
334330

335-
WARNING: `CloudEventsFunction` is a feature of Cloud Functions gen 2 only.
336-
337331
This is an example command to deploy your `CloudEventsFunction` to Google Cloud, as the function is triggered by a Storage event,
338332
it needs to use `--trigger-bucket` parameter with the name of a previously created bucket:
339333

340334
[source,bash]
341335
----
342-
gcloud functions deploy quarkus-example-cloud-event --gen2 \
336+
gcloud functions deploy quarkus-example-cloud-event \
343337
--entry-point=io.quarkus.gcp.functions.QuarkusCloudEventsFunction \
344338
--runtime=java21 --trigger-bucket=example-cloud-event --source=target/deployment
345339
----
@@ -429,8 +423,6 @@ This will call your PubSub background function with a PubSubMessage `{"greeting"
429423

430424
=== The CloudEventsFunction
431425

432-
IMPORTANT: `CloudEventsFunction` is a feature of Cloud Function gen 2 only.
433-
434426
For cloud events functions, you launch the invoker with a target class of `io.quarkus.gcp.functions.QuarkusCloudEventsFunction`.
435427

436428
[source,bash,subs="attributes"]
@@ -592,8 +584,6 @@ class RawBackgroundFunctionPubSubTestCase {
592584

593585
=== The CloudEventsFunction
594586

595-
WARNING: Cloud Events Function is a feature of Cloud Functions gen 2 only.
596-
597587
[source,java]
598588
----
599589
import static io.restassured.RestAssured.given;

0 commit comments

Comments
 (0)