Skip to content

Commit 2b2eaa1

Browse files
committed
feat: update references docs
Signed-off-by: seven <zilisheng1996@gmail.com>
1 parent 4be771f commit 2b2eaa1

File tree

4 files changed

+40
-11
lines changed

4 files changed

+40
-11
lines changed

docs/.vitepress/config.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export default defineConfig({
5454
{text: '命令行', link: 'cli'},
5555
{text: '支持服务', link: 'support'},
5656
{text: '常见问题', link: 'faq'},
57-
{text: '实战案例', link: 'case-study'},
57+
{text: '实践案例', link: 'case-study'},
5858
]
5959
}
6060
],

docs/reference.md

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,18 +156,29 @@ functions:
156156
memory: 512
157157
timeout: 10
158158
gpu: TESLA_8
159+
network:
160+
vpc_id: vpc-test-vpc
161+
subnet_ids:
162+
- vsw-test01
163+
- vsw-test02
164+
security_group:
165+
name: insight-poc-g-sg
166+
ingress:
167+
- TCP:0.0.0.0/0:80
168+
- TCP:0.0.0.0/0:443
169+
- TCP:0.0.0.0/0:22/22
170+
- ICMP:0.0.0.0/0:ALL
171+
egress:
172+
- ALL:0.0.0.0/0:ALL
159173
storage:
160174
disk: 512
161175
nas:
162176
- mount_path: /mnt/nas
163177
storage_class: standard
164-
vpc_id: vpc-123456
165-
subnet_ids: subnet-123456
166178
environment:
167179
NODE_ENV: production
168180
TEST_VAR: ${vars.testv}
169181
TEST_VAR_EXTRA: abcds-${vars.testv}-andyou
170-
171182
```
172183

173184
function支持的字段有:
@@ -196,7 +207,6 @@ function支持的字段有:
196207
> - **port**: 容器对外提供服务的端口
197208
> required: true
198209

199-
200210
- **timeout**: serverless函数的超时时间
201211
> 默认值: 15分钟
202212
- **memory**: serverless函数的内存大小
@@ -233,6 +243,25 @@ function支持的字段有:
233243
> 协议列表: `TCP`, `UDP`, `ICMP`, `ALL`
234244
> - **egress**: 出站规则, 与入站规则遵循相同的格式,但出站规则为可选项,默认允许所有出站流量
235245

246+
- **storage**: 函数的存储相关配置,包括函数的临时硬盘空间,挂载NAS存储以及对象存储
247+
> 类型: `object`
248+
> required: false
249+
> - **disk**: 函数的临时硬盘空间, 单位为MB
250+
> 类型: `integer`
251+
> required: false
252+
> default: 512
253+
> - **nas**: 挂载NAS存储到函数上
254+
> 类型: `object`
255+
> required: false
256+
> 注意⚠️:访问NAS需要函数所在的VPC和NAS在同一VPC下,且只能通过VPC内网访问,因此当指定了NAS时,需要同时指定`network`下的VPC和`subnet_ids`相关配置
257+
> - **mount_path**: 挂载到函数实例的路径
258+
> 类型: `string`
259+
> required: true
260+
> - **storage_class**: NAS存储类型
261+
> 类型: `enum`
262+
> required: true
263+
> 支持的存储类型: `STANDARD_CAPACITY`, `STANDARD_PERFORMANCE`, `EXTREME_STANDARD`, `EXTREME_ADVANCE`
264+
236265

237266
## events
238267

@@ -258,11 +287,11 @@ function支持的字段有:
258287
- **domain_name**: 自定义域名
259288
> required: true
260289
- **certificate_name**: 证书名称
261-
> required: true
290+
> required: false
262291
- **certificate_private_key**: 证书私钥
263-
> required: true
292+
> required: false
264293
- **certificate_body**: 证书内容
265-
> required: true
294+
> required: false
266295

267296
## databases
268297

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "serverlessinsight-site",
3-
"version": "0.3.0",
3+
"version": "0.3.1",
44
"description": "",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)