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:
parent
c292fef0ac
commit
23dcdd800b
@ -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() {
|
func (h *PeeringHandler) ProcessPeeringsNow() {
|
||||||
h.processPeerings()
|
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() {
|
func (h *PeeringHandler) Stop() {
|
||||||
close(h.stopCh)
|
close(h.stopCh)
|
||||||
// Process any remaining peerings synchronously
|
// Process any remaining peerings synchronously
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user