Expand description
A Library for Writing Kubeless Functions
#[macro_use]
extern crate kubeless;
fn say_hello(event: kubeless::Event, ctx: kubeless::Context) -> String {
String::from("Hello")
}
fn say_goodbye(event: kubeless::Event, ctx: kubeless::Context) -> String {
String::from("Goodbye")
}
fn main() {
// Expose say_hello and say_goodbye to Kubeless
kubeless::start(select_function!(say_hello, say_goodbye));
}
Re-exports§
pub use types::*;
Modules§
Macros§
- select_
function - Given a list of functions, return a function with an identifier matching the
FUNC_HANDLER
environment variable
Structs§
- FUNC_
HANDLER - The value of the
FUNC_HANDLER
environment variable
Constants§
- DEFAULT_
MEMORY_ LIMIT - The default memory limit
- DEFAULT_
TIMEOUT - The default timeout for user functions
Functions§
- start
- Start the HTTP server that Kubeless will use to interact with the container running this code