Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
49d2f4ede8 |
@@ -120,8 +120,8 @@ type handlerInfo struct {
|
||||
|
||||
// Streamer manages a connection to the RIPE RIS Live streaming API for receiving
|
||||
// real-time BGP UPDATE messages. It handles automatic reconnection with exponential
|
||||
// backoff, and dispatches messages to registered handlers via per-handler queues.
|
||||
// It never waits for room on a queue (see queueMessage).
|
||||
// backoff and dispatches messages to registered handlers via per-handler queues.
|
||||
// Its read loop never waits for room on a queue (see queueMessage).
|
||||
type Streamer struct {
|
||||
logger *logger.Logger
|
||||
client *http.Client
|
||||
@@ -882,13 +882,13 @@ func (s *Streamer) dispatchMessage(
|
||||
// msg instead. It never waits for room, so a full queue does not hold up the
|
||||
// read loop.
|
||||
//
|
||||
// A message that finds the queue full is dropped, except a STATE message: one
|
||||
// whose state is down is the only notice that all of a peer's routes are gone.
|
||||
// A STATE message that finds the queue full is held in info.heldState. Held
|
||||
// messages go into the queue, oldest first, before anything else for the
|
||||
// handler, as soon as there is room, or when Stop is called; while any is
|
||||
// still held, the handler's other messages are dropped, so none of them
|
||||
// overtakes a held down.
|
||||
// A message that finds the queue full is dropped, except a STATE message. A
|
||||
// STATE message whose state is down is the only notice that all of a peer's
|
||||
// routes are gone. A STATE message that finds the queue full is held in
|
||||
// info.heldState instead. Held messages go into the queue, oldest first, when a
|
||||
// later message for the handler finds room, or when Stop is called. While any
|
||||
// message is held, the handler's other messages are dropped, so none of them
|
||||
// overtakes a held STATE message.
|
||||
//
|
||||
// The held list stays small: a STATE message is a few hundred bytes and the
|
||||
// feed sends about ten a second, so a queue full for a minute holds about 600.
|
||||
|
||||
Reference in New Issue
Block a user