From b2bd7528c8f1bf811de9978e3e35fb7363502a63 Mon Sep 17 00:00:00 2001 From: crusader Date: Wed, 20 Jun 2018 21:08:53 +0900 Subject: [PATCH] ing --- Gopkg.lock | 2 +- internal/discoverer/ipv4/service_tcp.go | 24 ++++++++++++------------ internal/discoverer/ipv4/service_udp.go | 2 ++ 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index 0c1d9b9..b9d69f2 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -115,7 +115,7 @@ "service/container/discovery", "service/probe" ] - revision = "7770cfcc68d259e679074b57f0c9091f127e7644" + revision = "292dd88aae9a1eb66fe5c1d45cbac20799cce3a0" [[projects]] branch = "master" diff --git a/internal/discoverer/ipv4/service_tcp.go b/internal/discoverer/ipv4/service_tcp.go index 3cf5910..a6afe45 100644 --- a/internal/discoverer/ipv4/service_tcp.go +++ b/internal/discoverer/ipv4/service_tcp.go @@ -103,9 +103,9 @@ LOOP: if 0 == packetCount { s = &ocmd.Service{ - Name: m.Name(), - MetaCryptoTypeKey: sc.MetaCryptoType(), - DiscoveredDate: occu.NowPtr(), + Name: m.Name(), + MetaCryptoType: sc.MetaCryptoType(), + DiscoveredDate: occu.NowPtr(), } break LOOP } @@ -155,9 +155,9 @@ LOOP: if found { s = &ocmd.Service{ - Name: m.Name(), - MetaCryptoTypeKey: sc.MetaCryptoType(), - DiscoveredDate: occu.NowPtr(), + Name: m.Name(), + MetaCryptoType: sc.MetaCryptoType(), + DiscoveredDate: occu.NowPtr(), } break LOOP } @@ -213,9 +213,9 @@ LOOP: if nil != err { if !m.HasResponse(j) { s = &ocmd.Service{ - Name: m.Name(), - MetaCryptoTypeKey: sc.MetaCryptoType(), - DiscoveredDate: occu.NowPtr(), + Name: m.Name(), + MetaCryptoType: sc.MetaCryptoType(), + DiscoveredDate: occu.NowPtr(), } break } @@ -227,9 +227,9 @@ LOOP: if m.Match(info, j, csm.NewPacket(buf, rn)) { if packetCount-1 == j { s = &ocmd.Service{ - Name: m.Name(), - MetaCryptoTypeKey: sc.MetaCryptoType(), - DiscoveredDate: occu.NowPtr(), + Name: m.Name(), + MetaCryptoType: sc.MetaCryptoType(), + DiscoveredDate: occu.NowPtr(), } break } diff --git a/internal/discoverer/ipv4/service_udp.go b/internal/discoverer/ipv4/service_udp.go index 221ff33..f921fbe 100644 --- a/internal/discoverer/ipv4/service_udp.go +++ b/internal/discoverer/ipv4/service_udp.go @@ -7,6 +7,7 @@ import ( cuej "git.loafle.net/commons/util-go/encoding/json" occu "git.loafle.net/overflow/commons-go/core/util" ocmd "git.loafle.net/overflow/commons-go/model/discovery" + ocmm "git.loafle.net/overflow/commons-go/model/meta" "git.loafle.net/overflow/container_discovery/internal/matcher" ) @@ -28,6 +29,7 @@ func scanServiceUDP(port *ocmd.Port, ds *ocmd.DiscoverService, resultChan chan i s := &ocmd.Service{ Name: m.Name(), Port: port, + MetaCryptoType: ocmm.ToMetaCryptoType(ocmm.MetaCryptoTypeEnumNONE), DiscoveredDate: occu.NowPtr(), }