File tree Expand file tree Collapse file tree 3 files changed +17
-6
lines changed Expand file tree Collapse file tree 3 files changed +17
-6
lines changed Original file line number Diff line number Diff line change
1
+ export const WebServerImageDefaultPort = 9000 ;
Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ export interface FunctionCode {
12
12
RegistryId ?: string ;
13
13
Command ?: string ;
14
14
Args ?: string ;
15
+ ContainerImageAccelerate ?: boolean ;
16
+ ImagePort ?: number ;
15
17
} ;
16
18
}
17
19
@@ -203,6 +205,7 @@ export interface ScfCreateFunctionInputs {
203
205
204
206
cfs ?: {
205
207
cfsId : string ;
208
+ mountInsId ?: string ;
206
209
MountInsId ?: string ;
207
210
localMountDir : string ;
208
211
remoteMountDir : string ;
@@ -228,6 +231,10 @@ export interface ScfCreateFunctionInputs {
228
231
command ?: string ;
229
232
// 启动命令参数
230
233
args ?: string ;
234
+ // 是否开启镜像加速
235
+ containerImageAccelerate ?: boolean ;
236
+ // 监听端口: -1 表示job镜像,0~65535 表示Web Server镜像
237
+ imagePort ?: number ;
231
238
} ;
232
239
233
240
// 异步调用重试配置
@@ -391,25 +398,25 @@ export interface GetRequestStatusOptions {
391
398
/**
392
399
* 函数名称
393
400
*/
394
- functionName : string
401
+ functionName : string ;
395
402
396
403
/**
397
404
* 需要查询状态的请求id
398
405
*/
399
- functionRequestId : string
406
+ functionRequestId : string ;
400
407
401
408
/**
402
409
* 函数的所在的命名空间
403
410
*/
404
- namespace ?: string
411
+ namespace ?: string ;
405
412
406
413
/**
407
414
* 查询的开始时间,例如:2017-05-16 20:00:00,不填默认为当前时间 - 15min
408
415
*/
409
- startTime ?: string
416
+ startTime ?: string ;
410
417
411
418
/**
412
419
* 查询的结束时间,例如:2017-05-16 20:59:59,不填默认为当前时间。EndTime 需要晚于 StartTime。
413
420
*/
414
- endTime ?: string
421
+ endTime ?: string ;
415
422
}
Original file line number Diff line number Diff line change
1
+ import { WebServerImageDefaultPort } from './constants' ;
1
2
import { ScfCreateFunctionInputs , BaseFunctionConfig , ProtocolParams } from './interface' ;
2
3
const CONFIGS = require ( './config' ) . default ;
3
4
@@ -41,6 +42,8 @@ export const formatInputs = (inputs: ScfCreateFunctionInputs) => {
41
42
ImageConfig : {
42
43
ImageType : imageConfig . imageType ,
43
44
ImageUri : imageConfig . imageUri ,
45
+ ContainerImageAccelerate : imageConfig . containerImageAccelerate || false ,
46
+ ImagePort : imageConfig . imagePort || WebServerImageDefaultPort ,
44
47
} ,
45
48
} ;
46
49
if ( imageConfig . registryId ) {
@@ -149,7 +152,7 @@ export const formatInputs = (inputs: ScfCreateFunctionInputs) => {
149
152
inputs . cfs . forEach ( ( item ) => {
150
153
functionInputs . CfsConfig ?. CfsInsList . push ( {
151
154
CfsId : item . cfsId ,
152
- MountInsId : item . MountInsId || item . cfsId ,
155
+ MountInsId : item . mountInsId || item . MountInsId || item . cfsId ,
153
156
LocalMountDir : item . localMountDir ,
154
157
RemoteMountDir : item . remoteMountDir ,
155
158
UserGroupId : String ( item . userGroupId || 10000 ) ,
You can’t perform that action at this time.
0 commit comments