(type, port)
| 61 | const peerRepo = new Map(); |
| 62 | |
| 63 | export function createController(type, port) { |
| 64 | verifyCreatePermission(type, port); |
| 65 | const {contrConstructor} = repo.get(type); |
| 66 | return new contrConstructor(port); |
| 67 | } |
| 68 | |
| 69 | export function createPeerController(type) { |
| 70 | const contrConstructor = peerRepo.get(type); |