Improve process searcher

This commit is contained in:
世界
2022-08-20 10:38:12 +08:00
parent 0377a11719
commit 84e4677a94
16 changed files with 77 additions and 149 deletions

View File

@@ -1,4 +1,4 @@
//go:build !(cgo && linux && !android)
//go:build !linux || android
package process
@@ -7,6 +7,6 @@ import (
"net/netip"
)
func FindProcessInfo(searcher Searcher, ctx context.Context, network string, srcIP netip.Addr, srcPort int) (*Info, error) {
return searcher.FindProcessInfo(ctx, network, srcIP, srcPort)
func findProcessInfo(searcher Searcher, ctx context.Context, network string, source netip.AddrPort, destination netip.AddrPort) (*Info, error) {
return searcher.FindProcessInfo(ctx, network, source, destination)
}