kubeless

Crates.iokubeless
lib.rskubeless
version0.1.3
sourcesrc
created_at2018-06-30 15:44:08.36975
updated_at2018-06-30 20:19:04.447384
descriptionA library for writing Kubeless functions
homepage
repositoryhttps://github.com/Slowki/kubeless-rs
max_upload_size
id72308
size11,188
Stephan Wolski (Slowki)

documentation

README

kubeless-rs

Crates.io Crates.io

A Rust Library for Writing Kubeless Functions.

Example

#[macro_use]
extern crate kubeless;

fn say_hello(event: kubeless::Event, ctx: kubeless::Context) -> String {
    match event.data {
        Some(name) => format!("Hello, {}", String::from_utf8_lossy(&name)),
        None => String::from("Hello"),
    }
}

fn say_goodbye(event: kubeless::Event, ctx: kubeless::Context) -> String {
    match event.data {
        Some(name) => format!("Goodbye, {}", String::from_utf8_lossy(&name)),
        None => String::from("Goodbye"),
    }
}

fn main() {
    kubeless::start(select_function!(say_hello, say_goodbye));
}
Commit count: 11

cargo fmt