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 ...
随机推荐
- Oracle函数如何把符串装换为小写的格式
我们都知道Oracle函数在实际的应用中比较广泛,对其的实际操作与其相关功能也是颇为熟悉,但是你了解Oracle函数怎样使将字符串装换为小写的格式的具体操作吗?如果你有兴趣的话你就可以浏览以下的文章. ...
- react-native navigation的学习与使用
在很久之前,RN中文网说推荐用react-navigation替代navigator作为新的导航库,从RN 0.43版本开始,官方就已经停止维护Navigator了,所以强烈建议大家迁移到新的reac ...
- 《Maven实战》第13章 版本管理
版本管理:项目整体版本的演变过程的管理,如从1.0-SNAPSHOT到1.0,再到1.1-SNAPSHOT 版本控制:借助版本控制工具追踪代码的每一个变更 13.1什么是版本管理 版本管理:项目整体版 ...
- 初识 Zookeeper
云计算越来越流行的今天,单一机器处理能力已经不能满足我们的需求,不得不采用大量的服务集群.服务集群对外提供服务的过程中,有很多的配置需要随时更新,服务间需要协调工作,这些信息如何推送到各个节点?并且保 ...
- PHP正则表达式 /i, /is, /s, /isU等 都是些什么东西呢?
PHP正则表达式 /i, /is, /s, /isU等 都是些什么东西呢? i 不区分大小写 s 模式中的圆点元字符(.)匹配所有的字符,包括换行符 x 模式中的空白字符除了被转义的或在字符类中的以外 ...
- WildcardMatching和Regex,通配符匹配和正则表达式匹配
WildcardMatching:通配符匹配 算法分析: 1. 二个指针i, j分别指向字符串.匹配公式. 2. 如果匹配,直接2个指针一起前进. 3. 如果匹配公式是*,在字符串中依次匹配即可. 注 ...
- 深入理解虚拟机、容器和Hyper技术
本文首先介绍了操作系统,然后引出容器技术以及虚拟机技术,最后介绍了Docker和Hyper技术.通过本文可以清楚地对三者有感性认识. 操作系统概述 我们可以把操作系统简化为: 操作系统 = 内核 + ...
- 详解Django自定义过滤器
django过滤器的本质是函数,但函数太多了,为了显示自己的与众不同,设计者们想了个名字过滤器... django有一些内置的过滤器,但和新手赛车不多(把字母转成小写,求数组长度,从数组中取一个随机值 ...
- 在Hive中使用Avro
作者:过往记忆 | 新浪微博:左手牵右手TEL | 可以转载, 但必须以超链接形式标明文章原始出处和作者信息及版权声明博客地址:http://www.iteblog.com/文章标题:<在Hiv ...
- 【scala】可变与不可变的理解
我们定义变量的时候分为var可变变量和val不可变变量. 我们使用容器的时候也分为可变容器和不可变容器. List和Tuple本身就是不可变的,set和map分为可变和不可变的,默认为不可变. 我们看 ...