Skip to content
This repository has been archived by the owner on Oct 11, 2022. It is now read-only.

sample-accelerators/java-functions-accelerator

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Java Function

NOTE This repo has been archived and the sample has moved to:
https://github.com/vmware-tanzu/application-accelerator-samples/tree/main/java-function

This repo contains a simple Java Function that can be deployed as a TAP workload.

This function utilizes the buildpacks provided by VMware's open-source Function Buildpacks for Knative project.

Getting Started

To begin editing your function, refer to the tree diagram below of the file to modify:

java-function
└── src/main/java/functions
    └── Handler.java // EDIT THIS FILE
    └── models/

Inside this file, you will find a example main class, scaffolding, and a function that is invoked by default.

If using TAP workloads, and if you change the name of the default package or class, you will need to update workload.yaml to use the correct Java package:

spec:
  build:
    env:
    - name: BP_FUNCTION
      value: functions.Handler # UPDATE TO YOUR PACKAGE NAME

For more information about how the environment variable works, please see the Java buildpack documentation.

To see samples of code deployable as a Function (FaaS) experience, visit the samples folder.

Deploying

Please see DEPLOYING.md on how to build, deploy, and test your newly built function.

About

Maintained by Function Buildpacks for Knative Team (Cloud Native Runtimes)

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •