Skip to content

Commit 4039e10

Browse files
authored
feat:support GPU node type (#276)
1 parent 74652ba commit 4039e10

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

src/modules/scf/entities/scf.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@ export default class ScfEntity extends BaseEntity {
200200
delete reqInputs.InstallDependency;
201201
delete reqInputs.DeployMode;
202202
delete reqInputs.ProtocolType;
203+
delete reqInputs.NodeType;
204+
delete reqInputs.NodeSpec;
203205

204206
// +++++++++++++++++++++++
205207
// FIXME: 以下是函数绑定层逻辑,当函数有一个层,更新的时候想删除,需要传递参数 Layers 不能为空,必须包含特殊元素:{ LayerName: '', LayerVersion: 0 }

src/modules/scf/interface.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ export interface BaseFunctionConfig {
6565
InstallDependency?: 'TRUE' | 'FALSE';
6666
ProtocolType?: string;
6767
ProtocolParams?: ProtocolParams;
68+
NodeType?: string;
69+
NodeSpec?: string;
6870
}
6971

7072
export interface TriggerType {
@@ -164,6 +166,8 @@ export interface ScfCreateFunctionInputs {
164166
publicAccess?: boolean;
165167
eip?: boolean;
166168
l5Enable?: boolean;
169+
nodeType?: string;
170+
nodeSpec?: string;
167171

168172
role?: string;
169173
description?: string;

src/modules/scf/utils.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ export const formatInputs = (inputs: ScfCreateFunctionInputs) => {
2222
InstallDependency: inputs.installDependency === true ? 'TRUE' : 'FALSE',
2323
};
2424

25+
if (inputs.nodeType) {
26+
functionInputs.NodeType = inputs.nodeType;
27+
}
28+
29+
if (inputs.nodeSpec) {
30+
functionInputs.NodeSpec = inputs.nodeSpec;
31+
}
32+
2533
if (inputs.initTimeout) {
2634
functionInputs.InitTimeout = inputs.initTimeout;
2735
}

0 commit comments

Comments
 (0)