删除产品服务无用的接口
This commit is contained in:
parent
fd53f078ae
commit
2970f368bc
|
@ -10,20 +10,14 @@ type allocationProcessorFactory interface {
|
|||
allocationMessage(w *wsConnectItem, data []byte)
|
||||
}
|
||||
|
||||
var mapAllocationProcessor = make(map[constants.Websocket]allocationProcessorFactory)
|
||||
// 要添加分发在这里
|
||||
var mapAllocationProcessor = map[constants.Websocket]allocationProcessorFactory{
|
||||
constants.WEBSOCKET_RENDER_IMAGE: &renderProcessor{}, //渲染工厂
|
||||
}
|
||||
|
||||
func (w *wsConnectItem) newAllocationProcessor(msgType constants.Websocket) allocationProcessorFactory {
|
||||
if val, ok := mapAllocationProcessor[msgType]; ok {
|
||||
return val
|
||||
}
|
||||
var obj allocationProcessorFactory
|
||||
switch msgType {
|
||||
//图片渲染
|
||||
case constants.WEBSOCKET_RENDER_IMAGE:
|
||||
obj = &renderProcessor{}
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
mapAllocationProcessor[msgType] = obj
|
||||
return obj
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user