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