Add detailed godoc documentation to CLIEntry function
Expand the documentation comment for CLIEntry to provide more context about what the function does, including its use of the fx dependency injection framework, signal handling, and blocking behavior.
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
package routewatch
|
||||
|
||||
// peerhandler.go provides batched peer tracking functionality for BGP route monitoring.
|
||||
// It tracks BGP peers from all incoming RIS messages and maintains peer state in the database.
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
"sync"
|
||||
@@ -21,7 +24,10 @@ const (
|
||||
peerBatchTimeout = 2 * time.Second
|
||||
)
|
||||
|
||||
// PeerHandler tracks BGP peers from all message types using batched operations
|
||||
// PeerHandler tracks BGP peers from all message types using batched operations.
|
||||
// It maintains a queue of peer updates and periodically flushes them to the database
|
||||
// in batches to improve performance. The handler deduplicates peer updates within
|
||||
// each batch, keeping only the most recent update for each peer IP address.
|
||||
type PeerHandler struct {
|
||||
db database.Store
|
||||
logger *logger.Logger
|
||||
|
||||
Reference in New Issue
Block a user