Skip to content

Instantly share code, notes, and snippets.

@kennetham
Created March 12, 2019 03:17
Show Gist options
  • Save kennetham/383d7ecef193c0d865d05a9326b8e5c2 to your computer and use it in GitHub Desktop.
Save kennetham/383d7ecef193c0d865d05a9326b8e5c2 to your computer and use it in GitHub Desktop.
Java Serverless Function with Kubeless on Kubernetes
package io.kubeless;
import io.kubeless.Event;
import io.kubeless.Context;
import org.joda.time.LocalTime;
public class HelloWorld {
public String foo(io.kubeless.Event event, io.kubeless.Context context) {
System.out.println(event.Data);
LocalTime currentTime = new LocalTime();
return event.Data + " - Current local time is: " + currentTime;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment