Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: initlizar move below lifecycle #751

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions docs/en/yaml/function.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ category: 'Yaml-Spec'
| caPort | False | Number | CustomContainer/Runtime specified port |
| [customContainerConfig](#customcontainerconfig) | False | [Struct](#customcontainerconfig) | Custom image configuration |
| [environmentVariables](#environmentvariables) | False | [Struct](#environmentvariables) | Environment Variables |
| initializationTimeout | False | Number | initialization method timeout |
| initializer | False | String | Initializer |
| instanceConcurrency | False | Number | Single instance with multiple concurrency |
| instanceType | False | String | Function instance type, optional values: e1 (elastic instance), c1 (performance instance) |
| layers | False | List\<String\> | Function binding layer, only supports Nodejs and Python; the value is the ARN of the layer |
Expand Down Expand Up @@ -120,10 +118,11 @@ TempKey: tempValue

| Parameter Name | Required | Type | Parameter Description |
| -------------------------------- | ----- | ----------------------------- | -------------- |
| [preFreeze](#prefreeze and prestop) | False | [Struct](#prefreeze and prestop) | PreFreeze function |
| [preStop](#prefreeze and prestop) | False | [Struct](#prefreeze and prestop) | PreStop function |
| [preFreeze](#LifecycleEntryConfig) | False | [Struct](#LifecycleEntryConfig) | PreFreeze function |
| [preStop](#LifecycleEntryConfig) | False | [Struct](#LifecycleEntryConfig) | PreStop function |
| [initializer](#LifecycleEntryConfig) | False | [Struct](#LifecycleEntryConfig) | Initializer function |

#### preFreeze and preStop
#### LifecycleEntryConfig

| Parameter Name | Required | Type | Parameter Description |
| ------- | ----- | ------ | -------- |
Expand Down
5 changes: 3 additions & 2 deletions docs/en/yaml/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,15 @@ services:
accelerationType: Default # Mirror acceleration switch, optional values: 'Default', 'None', the former means on, the latter means off
environmentVariables: # environment variables
key: 'value'
initializationTimeout: 20 # initialization method timeout
initializer: index.init # initialization method
instanceConcurrency: 1 # single instance multiple concurrency
instanceType: e1 # Function instance type, optional values ​​are: e1 (elastic instance), c1 (performance instance)
layers: # Function binding layer, only supports Nodejs and Python; the value is the ARN of the layer
- xxx
- xxx
instanceLifecycleConfig: # extension function
initializer: # initialization
handler: index.xxx # function entry
timeout: 60 # timeout
preFreeze: # PreFreeze function
handler: index.xxx # function entry
timeout: 60 # timeout
Expand Down
9 changes: 4 additions & 5 deletions docs/zh/yaml/function.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ category: 'Yaml规范'
| caPort | False | Number | CustomContainer/Runtime指定端口 |
| [customContainerConfig](#customcontainerconfig) | False | [Struct](#customcontainerconfig) | 自定义镜像配置 |
| [environmentVariables](#environmentvariables) | False | [Struct](#environmentvariables) | 环境变量 |
| initializationTimeout | False | Number | 初始化方法超时时间 |
| initializer | False | String | 初始化方法 |
| instanceConcurrency | False | Number | 单实例多并发 |
| instanceType | False | String | 函数实例类型,可选值为:e1(弹性实例)、c1(性能实例) |
| layers | False | List\<String\> | 函数绑定层,仅支持 Nodejs、Python;取值是层的 ARN |
Expand Down Expand Up @@ -122,10 +120,11 @@ DB_connection: jdbc:mysql://rm-bp90434sds45c.mysql.rds.aliyuncs.com:3306/litemal

| 参数名 | 必填 | 类型 | 参数描述 |
| -------------------------------- | ----- | ----------------------------- | -------------- |
| [preFreeze](#prefreeze和prestop) | False | [Struct](#prefreeze和prestop) | PreFreeze 函数 |
| [preStop](#prefreeze和prestop) | False | [Struct](#prefreeze和prestop) | PreStop 函数 |
| [preFreeze](#生命周期函数配置) | False | [Struct](#生命周期函数配置) | PreFreeze 函数 |
| [preStop](#生命周期函数配置) | False | [Struct](#生命周期函数配置) | PreStop 函数 |
| [initializer](#生命周期函数配置) | False | [Struct](#生命周期函数配置) | 初始化函数 |

#### preFreeze和preStop
#### 生命周期函数配置

| 参数名 | 必填 | 类型 | 参数描述 |
| ------- | ----- | ------ | -------- |
Expand Down
5 changes: 3 additions & 2 deletions docs/zh/yaml/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,15 @@ services:
accelerationType: Default # 镜像加速开关,可选值:'Default'、'None',前者表示开启,后者表示关闭
environmentVariables: # 环境变量
key: 'value'
initializationTimeout: 20 # 初始化方法超时时间
initializer: index.init # 初始化方法
instanceConcurrency: 1 # 单实例多并发
instanceType: e1 # 函数实例类型,可选值为:e1(弹性实例)、c1(性能实例)
layers: # 函数绑定层,仅支持 Nodejs、Python;取值是层的 ARN
- xxx
- xxx
instanceLifecycleConfig: # 扩展函数
initializer: # 初始化方法
handler: index.xxx # 函数入口
timeout: 60 # 超时时间
preFreeze: # PreFreeze 函数
handler: index.xxx # 函数入口
timeout: 60 # 超时时间
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@
"preset": "ts-jest",
"testEnvironment": "node"
}
}
}
Loading