Giter VIP home page Giter VIP logo

fns's Introduction

FNS


Golang的函数式框架。标准化协议来简化开发过程。

特性

使用

创建项目

一、安装fns

go install github.com/aacfactory/fns/cmd/fns@latest

二、使用fns创建项目。

mkdir {your project path}
cd {your project path}
fns init --mod={mod} --img={docker image name} --work={true} --version={go version} . 
## Example
# fns init --mod=foo.com/project --img={foo.com/project} --work=true --version=1.21.0 .

编写代码

一、理解项目结构

二、设置配置依赖

三、创建服务标识

四、创建函数

五、运行go generate生成代码

运行项目

设置环境变量激活配置

FNS-ACTIVE=local,则运行时使用fns-local.yaml的配置。

测试与分析

发布API文档

开启API文档功能,通过浏览器或相关OPENAPI工具进行查阅。

集群

开启集群功能即可,无需其它改动。

当运行在kubernetes环境中时,请使用 inject 把 POD IP 注入到FNS-HOST环境变量中,最后把配置中cluster.hostRetriever的值设置为env

客制化HTTP服务

第三方服务集成

服务化

服务化第三方服务的SDK,业务服务通过函数进行调用。

组件化

组件化第三方服务的SDK,然后注入到业务服务中。

fns's People

Contributors

ryouginevermore avatar

Stargazers

 avatar  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.