Crate kubeless[][src]

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

types

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