mirror of
https://github.com/logos-messaging/go-libp2p-pubsub.git
synced 2026-01-08 15:53:07 +00:00
more docs
This commit is contained in:
parent
c242b2e7be
commit
14d1a35e0c
@ -14,8 +14,14 @@ import (
|
|||||||
// The tracking of promises is probabilistic to avoid using too much memory.
|
// The tracking of promises is probabilistic to avoid using too much memory.
|
||||||
type gossipTracer struct {
|
type gossipTracer struct {
|
||||||
sync.Mutex
|
sync.Mutex
|
||||||
msgID MsgIdFunction
|
|
||||||
promises map[string]map[peer.ID]time.Time
|
msgID MsgIdFunction
|
||||||
|
|
||||||
|
// promises for messages by message ID; for each message tracked, we track the promise
|
||||||
|
// expiration time for each peer.
|
||||||
|
promises map[string]map[peer.ID]time.Time
|
||||||
|
// promises for each peer; for each peer, we track the promised message IDs.
|
||||||
|
// this index allows us to quickly void promises when a peer is throttled.
|
||||||
peerPromises map[peer.ID]map[string]struct{}
|
peerPromises map[peer.ID]map[string]struct{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -188,7 +188,8 @@ type AcceptStatus int
|
|||||||
const (
|
const (
|
||||||
// AcceptAll signals to accept the incoming RPC for full processing
|
// AcceptAll signals to accept the incoming RPC for full processing
|
||||||
AcceptNone AcceptStatus = iota
|
AcceptNone AcceptStatus = iota
|
||||||
// AcceptControl signals to accept the incoming RPC only for control message processing
|
// AcceptControl signals to accept the incoming RPC only for control message processing by
|
||||||
|
// the router. Included payload messages will _not_ be pushed to the validation queue.
|
||||||
AcceptControl
|
AcceptControl
|
||||||
// AcceptNone signals to drop the incoming RPC
|
// AcceptNone signals to drop the incoming RPC
|
||||||
AcceptAll
|
AcceptAll
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user