Improve godoc documentation for PeeringHandler

Enhance documentation comments for constants, types, and exported methods
in peeringhandler.go to follow Go documentation conventions. The improved
comments provide more context about the purpose and behavior of each item.
This commit is contained in:
Jeffrey Paul 2025-12-27 12:26:07 +07:00
parent c292fef0ac
commit 23dcdd800b

View File

@ -165,7 +165,9 @@ func (h *PeeringHandler) prunePaths() {
}
}
// ProcessPeeringsNow forces immediate processing of peerings (for testing)
// ProcessPeeringsNow triggers immediate processing of all accumulated AS
// paths into peering records. This bypasses the normal periodic processing
// schedule and is primarily intended for testing purposes.
func (h *PeeringHandler) ProcessPeeringsNow() {
h.processPeerings()
}
@ -246,7 +248,10 @@ func (h *PeeringHandler) processPeerings() {
)
}
// Stop gracefully stops the handler and processes remaining peerings
// Stop gracefully shuts down the handler by signaling the background
// goroutines to stop and performing a final synchronous processing of
// any remaining AS paths. This ensures no peering data is lost during
// shutdown.
func (h *PeeringHandler) Stop() {
close(h.stopCh)
// Process any remaining peerings synchronously