MCPcopy
hub / github.com/xpf0000/FlyEnv / delByBin

Method delByBin

src/main/core/ServiceProcess.ts:123–129  ·  view source on GitHub ↗

按 bin 删除登记(停指定版本时用——bin 是实例唯一键,避免误删同模块其它版本)

(type: string, bins: string[])

Source from the content-addressed store, hash-verified

121
122 /** 按 bin 删除登记(停指定版本时用——bin 是实例唯一键,避免误删同模块其它版本) */
123 delByBin(type: string, bins: string[]) {
124 if (!this.servicePID[type]) {
125 return
126 }
127 this.servicePID[type] = this.servicePID[type].filter((item) => !bins.includes(item.item?.bin))
128 this.emitChange(type)
129 }
130
131 /** 删除某模块全部登记(停整个模块时用) */
132 delAll(type: string) {

Callers 3

startServiceMethod · 0.80
stopServiceMethod · 0.80
stopAllServiceMethod · 0.80

Calls 1

emitChangeMethod · 0.95

Tested by

no test coverage detected