From 172f4b36398db30fb61ca8ceb3f3ed510a812b91 Mon Sep 17 00:00:00 2001 From: Daniel-GrunbergerCA Date: Tue, 7 Nov 2023 17:44:50 +0200 Subject: [PATCH] rename func Signed-off-by: Daniel-GrunbergerCA --- pkg/containerwatcher/dnsmanager/dns_manager.go | 2 +- pkg/containerwatcher/dnsmanager/dns_manager_interface.go | 2 +- pkg/containerwatcher/dnsmanager/dns_manager_mock.go | 2 +- pkg/containerwatcher/dnsmanager/dns_manager_test.go | 2 +- pkg/containerwatcher/v1/container_watcher.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/containerwatcher/dnsmanager/dns_manager.go b/pkg/containerwatcher/dnsmanager/dns_manager.go index 15604152..fee3cbe0 100644 --- a/pkg/containerwatcher/dnsmanager/dns_manager.go +++ b/pkg/containerwatcher/dnsmanager/dns_manager.go @@ -22,7 +22,7 @@ func CreateDNSManager(ctx context.Context, cfg config.Config, k8sClient k8sclien return &DNSManager{} } -func (dm *DNSManager) SaveNetworkEvent(dnsEvent tracerdnstype.Event) { +func (dm *DNSManager) ProcessDNSEvent(dnsEvent tracerdnstype.Event) { for _, address := range dnsEvent.Addresses { dm.addressToDomainMap.Set(address, dnsEvent.DNSName) } diff --git a/pkg/containerwatcher/dnsmanager/dns_manager_interface.go b/pkg/containerwatcher/dnsmanager/dns_manager_interface.go index 886f2e5c..2dcd9e9c 100644 --- a/pkg/containerwatcher/dnsmanager/dns_manager_interface.go +++ b/pkg/containerwatcher/dnsmanager/dns_manager_interface.go @@ -5,7 +5,7 @@ import ( ) type DNSManagerClient interface { - SaveNetworkEvent(networkEvent tracerdnstype.Event) + ProcessDNSEvent(networkEvent tracerdnstype.Event) } type DNSResolver interface { diff --git a/pkg/containerwatcher/dnsmanager/dns_manager_mock.go b/pkg/containerwatcher/dnsmanager/dns_manager_mock.go index 30705a6b..29c54790 100644 --- a/pkg/containerwatcher/dnsmanager/dns_manager_mock.go +++ b/pkg/containerwatcher/dnsmanager/dns_manager_mock.go @@ -14,7 +14,7 @@ func CreateDNSManagerMock() *DNSManagerMock { return &DNSManagerMock{} } -func (n *DNSManagerMock) SaveNetworkEvent(event tracerdnstype.Event) { +func (n *DNSManagerMock) ProcessDNSEvent(event tracerdnstype.Event) { } func (n *DNSManagerMock) ResolveIPAddress(ipAddr string) (string, bool) { diff --git a/pkg/containerwatcher/dnsmanager/dns_manager_test.go b/pkg/containerwatcher/dnsmanager/dns_manager_test.go index 006dda88..e99e7d88 100644 --- a/pkg/containerwatcher/dnsmanager/dns_manager_test.go +++ b/pkg/containerwatcher/dnsmanager/dns_manager_test.go @@ -40,7 +40,7 @@ func TestResolveIPAddress(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { dm := &DNSManager{} - dm.SaveNetworkEvent(tt.dnsEvent) + dm.ProcessDNSEvent(tt.dnsEvent) got, _ := dm.ResolveIPAddress(tt.ipAddr) if got != tt.want { t.Errorf("ResolveIPAddress() got = %v, want %v", got, tt.want) diff --git a/pkg/containerwatcher/v1/container_watcher.go b/pkg/containerwatcher/v1/container_watcher.go index eaba32bc..91dc355e 100644 --- a/pkg/containerwatcher/v1/container_watcher.go +++ b/pkg/containerwatcher/v1/container_watcher.go @@ -146,7 +146,7 @@ func CreateIGContainerWatcher(cfg config.Config, applicationProfileManager appli return } - dnsManagerClient.SaveNetworkEvent(event) + dnsManagerClient.ProcessDNSEvent(event) }) if err != nil {