File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
src/main/java/com/google/cloud/functions Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 48
48
<tag >HEAD</tag >
49
49
</scm >
50
50
51
+ <dependencies >
52
+ <dependency >
53
+ <groupId >io.cloudevents</groupId >
54
+ <artifactId >cloudevents-api</artifactId >
55
+ <version >2.0.0-milestone1</version >
56
+ </dependency >
57
+ </dependencies >
58
+
51
59
<build >
52
60
<plugins >
53
61
<plugin >
Original file line number Diff line number Diff line change
1
+ package com .google .cloud .functions ;
2
+
3
+ import io .cloudevents .CloudEvent ;
4
+
5
+ /**
6
+ * Represents a Cloud Function that is activated by an event and parsed into a {@link CloudEvent} object.
7
+ * Because the {@link CloudEvent} API is not yet stable, a function implemented using this class may not
8
+ * build or work correctly with later versions of that API. Once the API is stable, this interface will
9
+ * become {@code CloudEventsFunction} and will also be stable.
10
+ */
11
+ @ FunctionalInterface
12
+ public interface ExperimentalCloudEventsFunction {
13
+ /**
14
+ * Called to service an incoming event. This interface is implemented by user code to
15
+ * provide the action for a given background function. If this method throws any exception
16
+ * (including any {@link Error}) then the HTTP response will have a 500 status code.
17
+ *
18
+ * @param event the event.
19
+ * @throws Exception to produce a 500 status code in the HTTP response.
20
+ */
21
+ void accept (CloudEvent event ) throws Exception ;
22
+ }
You can’t perform that action at this time.
0 commit comments