Code Monkey home page Code Monkey logo

openfaas_rust-hasura-action_func's Introduction

OpenFaaS Rust Hasura Action function

An OpenFaaS Hasura Action written in Rust actix-web.

Installation

faas template pull https://github.com/austinrivas/rust-hasura-action-template

Create Function

faas new <name> --lang rust-hasura-action

Testing

cargo test --manifest-path ./function/Cargo.toml

Format

cargo fmt --manifest-path ./function/Cargo.toml

Linting

cargo clippy --manifest-path ./function/Cargo.toml

Deployment

faas up -f function.yml --gateway $GATEWAY_URL

Remote Dev

This function includes an okteto.yml function to facilitate remote dev and debugging.

cd function
okteto up
 ✓  Development environment activated
 ✓  Files synchronized
    Namespace: austinrivas
    Name:      rust-hasura-action-hello
    Forward:   8080 -> 8080
               9229 -> 9229
okteto> fwatchdog

This will compile the function in the remote dev environment. Rust is fast code that compiles slow, so patience is a virtue here. Okteto will cache the build so that later compilations will be much faster.

Okteto will syncronize local changes with the remote environment.

Currently remote debugging is not implemented, however it is a future goal of this project.

This function is based on the OpenFaaS rust-hasura-action-template.

This template provides a thin wrapper around the actix-web Server.

Extras

This repo also contains an Okteto Remote Development Configuration for use on the Okteto Platform.

A github action is included that will trigger on pull request. This action runs the rust tests / lint / check / format.

openfaas_rust-hasura-action_func's People

Watchers

James Cloos avatar Austin Rivas avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.