diff --git a/probe/endpoint/procspy/spy.go b/probe/endpoint/procspy/spy.go index 78312fe64..73d4a560d 100644 --- a/probe/endpoint/procspy/spy.go +++ b/probe/endpoint/procspy/spy.go @@ -33,6 +33,7 @@ type ConnIter interface { Next() *Connection } +// ConnectionScanner scans the system for established (TCP) connections type ConnectionScanner interface { // Connections returns all established (TCP) connections. If processes is // false we'll just list all TCP connections, and there is no need to be root. diff --git a/probe/endpoint/procspy/spy_darwin.go b/probe/endpoint/procspy/spy_darwin.go index d14400bfe..bec6f2a13 100644 --- a/probe/endpoint/procspy/spy_darwin.go +++ b/probe/endpoint/procspy/spy_darwin.go @@ -13,6 +13,7 @@ const ( lsofBinary = "lsof" ) +// NewConnectionScanner creates a new Darwin ConnectionScanner func NewConnectionScanner(_ process.Walker) ConnectionScanner { return &darwinScanner{} } diff --git a/probe/endpoint/procspy/spy_linux.go b/probe/endpoint/procspy/spy_linux.go index 65b5829a2..73ecddf33 100644 --- a/probe/endpoint/procspy/spy_linux.go +++ b/probe/endpoint/procspy/spy_linux.go @@ -32,6 +32,7 @@ func (c *pnConnIter) Next() *Connection { return n } +// NewConnectionScanner creates a new Linux ConnectionScanner func NewConnectionScanner(walker process.Walker) ConnectionScanner { br := newBackgroundReader(walker) br.start()