From bff5ba70430fbdbfacadeb2523562461f1d401d0 Mon Sep 17 00:00:00 2001 From: crusader Date: Wed, 4 Jul 2018 00:07:12 +0900 Subject: [PATCH] ing --- crawler/health/SocketHeahthCrawler.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crawler/health/SocketHeahthCrawler.go b/crawler/health/SocketHeahthCrawler.go index 12562fb..3b380ce 100644 --- a/crawler/health/SocketHeahthCrawler.go +++ b/crawler/health/SocketHeahthCrawler.go @@ -8,6 +8,7 @@ import ( cnsm "git.loafle.net/commons/service_matcher-go" cuej "git.loafle.net/commons/util-go/encoding/json" + ocmm "git.loafle.net/overflow/commons-go/model/meta" ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "git.loafle.net/overflow/crawler-go" ) @@ -33,16 +34,16 @@ func (s *SocketHealthCrawler) getConnection(config *ocmsc.SensorConfig) (net.Con network := "" switch metaIPTypeKey { - case "V6": + case ocmm.MetaIPTypeEnumV4.String(): switch metaPortTypeKey { - case "UDP": + case ocmm.MetaPortTypeEnumUDP.String(): network = "udp6" default: network = "tcp6" } default: switch metaPortTypeKey { - case "UDP": + case ocmm.MetaPortTypeEnumUDP.String(): network = "udp" default: network = "tcp" @@ -54,7 +55,7 @@ func (s *SocketHealthCrawler) getConnection(config *ocmsc.SensorConfig) (net.Con return nil, err } - if metaCryptoTypeKey == "TLS" { + if metaCryptoTypeKey == ocmm.MetaCryptoTypeEnumTLS.String() { cfg := &tls.Config{ InsecureSkipVerify: true, ServerName: ip,