Event Functions¶
Event functions can be configured with event triggers and integrate a variety of OpenTelekomCloud products (such as object storage service OBS, distributed messaging service RabbitMQ version, cloud log service LTS, etc.).
FunctionGraph Java libraries¶
OpenTelekomCloud provides following libraries for FunctionGraph.
com.opentelekomcloud:opentelekomcloud-functiongraph-java-core (required)
Defines handler method interfaces and context object that the runtime passes to the handler.
com.opentelekomcloud:opentelekomcloud-functiongraph-java-events
Event sources from services that invoke FunctionGraph functions (e.g. APIG)
com.opentelekomcloud:opentelekomcloud-functiongraph-java-test
Defines a test classes, that can be used in JUnit tests.
OpenTelekomCloud community provides following libraries for Java development:
The community edition of OTC Java SDK v1 provides utility methods to handle request signing.
Installing libraries¶
These libraries are available through:
Install libraries to local .m2 repository
# Check out the repository with tag v1.0.0
git clone --branch v1.0.0 --single-branch "https://github.com/opentelekomcloud/opentelekomcloud-functiongraph-java.git"
# change to folder
cd opentelekomcloud-functiongraph-java
# run maven clean install
mvn clean install
For Maven Central, there is no special configuration needed.
Just add the dependencies to your pom.xml as shown below.
For list of libraries available in Maven Central see: Maven Repository
Usage¶
These packages can be included as dependency to your Maven pom.xml as follows:
<dependencies>
...
<dependency>
<groupId>io.github.opentelekomcloud</groupId>
<artifactId>opentelekomcloud-functiongraph-java-core</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>io.github.opentelekomcloud</groupId>
<artifactId>opentelekomcloud-functiongraph-java-events</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>io.github.opentelekomcloud</groupId>
<artifactId>opentelekomcloud-functiongraph-java-test</artifactId>
<version>1.0.0</version>
<scope>test</scope>
</dependency>
...
<dependencies>