Skip to content

Commit

Permalink
rename func
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel-GrunbergerCA <[email protected]>
  • Loading branch information
Daniel-GrunbergerCA committed Nov 7, 2023
1 parent 9c7f498 commit 172f4b3
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/containerwatcher/dnsmanager/dns_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/containerwatcher/dnsmanager/dns_manager_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
)

type DNSManagerClient interface {
SaveNetworkEvent(networkEvent tracerdnstype.Event)
ProcessDNSEvent(networkEvent tracerdnstype.Event)
}

type DNSResolver interface {
Expand Down
2 changes: 1 addition & 1 deletion pkg/containerwatcher/dnsmanager/dns_manager_mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/containerwatcher/dnsmanager/dns_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion pkg/containerwatcher/v1/container_watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func CreateIGContainerWatcher(cfg config.Config, applicationProfileManager appli
return
}

dnsManagerClient.SaveNetworkEvent(event)
dnsManagerClient.ProcessDNSEvent(event)
})

if err != nil {
Expand Down

0 comments on commit 172f4b3

Please sign in to comment.