fn project Function files 说明
- func.yaml
- func.json
An example of a function file:
name: fnproject/hello
version: 0.0.1
type: sync
memory: 128
config:
key: value
key2: value2
keyN: valueN
headers:
Content-Type: text/plain
build:
- make
- make test
expects:
config:
- name: SECRET_1
required: true
- name: SECRET_2
required: false
name is the name and tag to which this function will be pushed to and the route updated to use it.
path (optional) allows you to overwrite the calculated route from the path position. You may use it to override the calculated route. If you plan to use fn test --remote="", this is mandatory.
version represents current version of the function. When deploying, it is appended to the image as a tag.
runtime represents programming language runtime, for example, 'go', 'python', 'java', etc. The runtime 'docker' will use the existing Dockerfile if one exists.
build (optional) is an array of local shell calls which are used to help building the function. TODO: Deprecate this?
type (optional) allows you to set the type of the route. sync, for functions whose response are sent back to the requester; orasync, for functions that are started and return a call ID to customer while it executes in background. Default: sync.
memory (optional) allows you to set a maximum memory threshold for this function. If this function exceeds this limit during execution, it is stopped and error message is logged. Default: 128.
timeout (optional) is the maximum time a function will be allowed to run. Default is 30 seconds.
headers (optional) is a set of HTTP headers to be returned in the response of this function calls.
config (optional) is a set of configuration variables to be passed onto the function as environment variables. These configuration options shall override application configuration during functions execution. See Configuration for more information.
expects (optional) a list of config/env vars that are required to run this function. These vars will be used when running/testing locally, if found in your local environment. If these vars are not found, local testing will fail.
Hot functions
hot functions support also adds two extra options to this configuration file.
format (optional) is one of the streaming formats covered at function-format.md.
idle_timeout (optional) is the time in seconds a container will remain alive without receiving any new requests; hot functions will stay alive as long as they receive a request in this interval. Default: 30.
fn project Function files 说明的更多相关文章
- Using command-line Subversion to access project source files
Help index About source code version control with Software Configuration Management (Subversion) Usi ...
- fn project 打包Function
Option 1 (recommended): Use the fn cli tool We recommend using the fn cli tool which will handle a ...
- fn project 扩展
目前支持的扩展方式 Listeners - listen to API events such as a route getting updated and react accordingly. ...
- fn project 生产环境使用
此为官方的参考说明 Running Fn in Production The QuickStart guide is intended to quickly get started and kic ...
- fn project 对象模型
Applications At the root of everything are applications. In fn, an application is essentially a grou ...
- fn project hot functions 说明
1. 简单介绍 所谓 hot functions 实际上就是长时间运行的functions ,简单理解类似后台任务 2. fnproject 处理的方式 fnproject 使用 类似 http的 ...
- fn project k8s 集成
具体部署还是比较简单的,以下为官方参考,只是有一个service type 为 loadBlancer 实际使用需要修改为NodePort Prerequisite 1: working Kuber ...
- fn project 私有镜像发布
1. 说明 fnproject 默认的docker registry 是 dockerhub 对于企业应用还是不太方便的 还好系统系统了配置参数方便我们进行配置,与开源harbor 进行集成 2. 使 ...
- fn project Message Queues 配置
Message Queues A message queue is used to coordinate asynchronous function calls that run through ...
随机推荐
- java实验一报告
北京电子科技学院(BESTI) 实 验 报 告 课程:Java 班级: 1352 姓名:黄晓妍 学号:20135227 成绩: 指导教师:娄嘉 ...
- uiautomator--图像处理
一.图像处理在自动化中使用场景 1)效果类截图 图像处理技术在自动化的场景中很容易使用到.自动化不是万能的,有时候效果类的是无法进行验证的,但是效果类一般会有图像显示,我们可以通过截图对比实现. 2 ...
- [SCOI2005]扫雷Mine
1088: [SCOI2005]扫雷Mine Time Limit: 10 Sec Memory Limit: 162 MBSubmit: 2028 Solved: 1187[Submit][St ...
- sqoop数据导入到Hdfs 或者hive
用java代码调用shell脚本执行sqoop将hive表中数据导出到mysql http://www.cnblogs.com/xuyou551/p/7999773.html 用sqoop将mysql ...
- js关闭浏览器窗口及检查浏览器关闭事件
js关闭浏览器窗口,不弹出提示框.支持ie6+,火狐,谷歌等浏览器,下面以一个示例为大家详细介绍下具体的实现方法,感兴趣的朋友可以参考下 js关闭浏览器窗口 js关闭浏览器窗口,不弹出提示框.支持 ...
- Mongodb笔记(三)user && aggregate && mapReduce
版本:mongodb3.4. User: mongodb使用验证登录:默认不开启,mongod中使用--auth开启: mongod -port=3000 --auth : 基本方法: db.cr ...
- Spring之RMI 远程方法调用 (Remote Method Invocation)
RMI 指的是远程方法调用 (Remote Method Invocation) 1. RMI的原理: RMI系统结构,在客户端和服务器端都有几层结构. 方法调用从客户对象经占位程序(Stub).远程 ...
- 关键C函数备录
一.搜索指定路径下的文件 (1) intptr_t _findfirst(const char *, struct _finddata_t *);//可以使用通配符*或? (2) int _findn ...
- 【scala】数组和列表
一.数组Array 1.创建数组 隐式:val greetStrings = new Array[String](3); 显式:val greetStrings : Array[String] = n ...
- 007——VUE中非常使用的计算属性computed实例
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...