Skip to content

Latest commit

 

History

History
84 lines (60 loc) · 1.59 KB

README.md

File metadata and controls

84 lines (60 loc) · 1.59 KB

Fluor Functions

Fluor Functions is a experimental serverless platform written in Rust.

CI MIT licensed

Setup

Requirements

Running

Follow the examples

# Run the Fluor Server
cargo run --release > /dev/null 2>&1 &

# Go to example directory
cd examples/rust
# Create a compressed archive from project directory
# -- "hello/" is a project directory
tar -czvf source.tar.gz -C hello/ .
# Create a new function (hello-rust)

JSON=$(cat <<EOF
{
    "name": "hello-rust",
    "language": "rust",
    "source": "$(base64 -w 0 source.tar.gz)",
    "method": "GET",
    "path": "/hello-rust/",
    "cpu": "2",
    "memory": "512m",
    "uptime": "30"
}
EOF
)

curl -X POST -H "Content-Type:application/json" -d "$JSON" "http://localhost:8000/function/"
# Invoke the function
curl -X GET "http://localhost:8000/hello-rust/"
# Delete the function
curl -X DELETE -H "Content-Type:application/json" -d "$JSON" "http://localhost:8000/function/"
# Stop the Fluor Server
killall -9 fluor

Contributions

Contributions in the form of bug reports, feature requests, or pull requests are welcome.

License

Fluor Functions is licensed under the MIT License