package service import ( omd "git.loafle.net/overflow/model/discovery" omm "git.loafle.net/overflow/model/meta" "git.loafle.net/overflow_scanner/probe/discovery/session" ) func Scan(discoverySession session.DiscoverySession, targetPort *omd.Port) error { metaPortTypeEnum := omm.ToMetaPortTypeEnum(targetPort.MetaPortType) switch metaPortTypeEnum { case omm.MetaPortTypeEnumTCP: return scanTCP(discoverySession, targetPort) case omm.MetaPortTypeEnumUDP: return scanUDP(discoverySession, targetPort) } return nil }