mirror of
https://github.com/dcarrillo/whatismyip.git
synced 2025-11-04 20:59:09 +00:00
New feature: prometheus metrics endpoint (#46)
This commit is contained in:
@@ -3,6 +3,8 @@ package service
|
||||
import (
|
||||
"net"
|
||||
"time"
|
||||
|
||||
"github.com/dcarrillo/whatismyip/internal/metrics"
|
||||
)
|
||||
|
||||
const scannerTimeOut = 3 * time.Second
|
||||
@@ -20,5 +22,6 @@ func (p *PortScanner) IsPortOpen() (bool, error) {
|
||||
defer conn.Close()
|
||||
}
|
||||
|
||||
metrics.RecordPortScan()
|
||||
return true, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user