diff --git a/gossip_tracer.go b/gossip_tracer.go index 083327fb..3805e339 100644 --- a/gossip_tracer.go +++ b/gossip_tracer.go @@ -162,7 +162,7 @@ func (gt *gossipTracer) DuplicateMessage(msg *Message) {} func (gt *gossipTracer) RecvRPC(rpc *RPC) {} func (gt *gossipTracer) SendRPC(rpc *RPC, p peer.ID) {} func (gt *gossipTracer) DropRPC(rpc *RPC, p peer.ID) {} -func (gt *gossipTracer) DroppedInSubscribe(msg *Message) {} +func (gt *gossipTracer) UndeliverableMessage(msg *Message) {} func (gt *gossipTracer) ThrottlePeer(p peer.ID) { gt.Lock() diff --git a/peer_gater.go b/peer_gater.go index 291fc9fc..e334324c 100644 --- a/peer_gater.go +++ b/peer_gater.go @@ -450,4 +450,4 @@ func (pg *peerGater) SendRPC(rpc *RPC, p peer.ID) {} func (pg *peerGater) DropRPC(rpc *RPC, p peer.ID) {} -func (pg *peerGater) DroppedInSubscribe(msg *Message) {} +func (pg *peerGater) UndeliverableMessage(msg *Message) {} diff --git a/pubsub.go b/pubsub.go index 84d4bfdf..3c6c75bf 100644 --- a/pubsub.go +++ b/pubsub.go @@ -842,7 +842,7 @@ func (p *PubSub) notifySubs(msg *Message) { select { case f.ch <- msg: default: - p.tracer.DroppedInSubscribe(msg) + p.tracer.UndeliverableMessage(msg) log.Infof("Can't deliver message to subscription for topic %s; subscriber too slow", topic) } } diff --git a/score.go b/score.go index bbd79d34..d859687c 100644 --- a/score.go +++ b/score.go @@ -825,7 +825,7 @@ func (ps *peerScore) SendRPC(rpc *RPC, p peer.ID) {} func (ps *peerScore) DropRPC(rpc *RPC, p peer.ID) {} -func (ps *peerScore) DroppedInSubscribe(msg *Message) {} +func (ps *peerScore) UndeliverableMessage(msg *Message) {} // message delivery records func (d *messageDeliveries) getRecord(id string) *deliveryRecord { diff --git a/tag_tracer.go b/tag_tracer.go index 2182b8da..65e99be9 100644 --- a/tag_tracer.go +++ b/tag_tracer.go @@ -251,9 +251,9 @@ func (t *tagTracer) RejectMessage(msg *Message, reason string) { } } -func (t *tagTracer) RemovePeer(peer.ID) {} -func (t *tagTracer) ThrottlePeer(p peer.ID) {} -func (t *tagTracer) RecvRPC(rpc *RPC) {} -func (t *tagTracer) SendRPC(rpc *RPC, p peer.ID) {} -func (t *tagTracer) DropRPC(rpc *RPC, p peer.ID) {} -func (t *tagTracer) DroppedInSubscribe(msg *Message) {} +func (t *tagTracer) RemovePeer(peer.ID) {} +func (t *tagTracer) ThrottlePeer(p peer.ID) {} +func (t *tagTracer) RecvRPC(rpc *RPC) {} +func (t *tagTracer) SendRPC(rpc *RPC, p peer.ID) {} +func (t *tagTracer) DropRPC(rpc *RPC, p peer.ID) {} +func (t *tagTracer) UndeliverableMessage(msg *Message) {} diff --git a/trace.go b/trace.go index c7ac52e1..32325422 100644 --- a/trace.go +++ b/trace.go @@ -54,9 +54,9 @@ type RawTracer interface { SendRPC(rpc *RPC, p peer.ID) // DropRPC is invoked when an outbound RPC is dropped, typically because of a queue full. DropRPC(rpc *RPC, p peer.ID) - // DroppedInSubscribe is invoked when the consumer of Subscribe is not reading messages fast enough and + // UndeliverableMessage is invoked when the consumer of Subscribe is not reading messages fast enough and // the pressure release mechanism trigger, dropping messages. - DroppedInSubscribe(msg *Message) + UndeliverableMessage(msg *Message) } // pubsub tracer details @@ -328,13 +328,13 @@ func (t *pubsubTracer) DropRPC(rpc *RPC, p peer.ID) { t.tracer.Trace(evt) } -func (t *pubsubTracer) DroppedInSubscribe(msg *Message) { +func (t *pubsubTracer) UndeliverableMessage(msg *Message) { if t == nil { return } for _, tr := range t.raw { - tr.DroppedInSubscribe(msg) + tr.UndeliverableMessage(msg) } }