mirror of
https://github.com/logos-messaging/go-libp2p-pubsub.git
synced 2026-01-05 22:33:10 +00:00
trace publish
This commit is contained in:
parent
67275a6382
commit
89c7ed46e3
@ -446,6 +446,7 @@ func (p *PubSub) processLoop(ctx context.Context) {
|
|||||||
p.handleIncomingRPC(rpc)
|
p.handleIncomingRPC(rpc)
|
||||||
|
|
||||||
case msg := <-p.publish:
|
case msg := <-p.publish:
|
||||||
|
p.tracer.PublishMessage(msg)
|
||||||
p.pushMsg(msg)
|
p.pushMsg(msg)
|
||||||
|
|
||||||
case msg := <-p.sendMsg:
|
case msg := <-p.sendMsg:
|
||||||
|
|||||||
6
trace.go
6
trace.go
@ -14,6 +14,12 @@ type pubsubTracer struct {
|
|||||||
tracer EventTracer
|
tracer EventTracer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (t *pubsubTracer) PublishMessage(msg *Message) {
|
||||||
|
if t != nil {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (t *pubsubTracer) RejectMessage(msg *Message, reason string) {
|
func (t *pubsubTracer) RejectMessage(msg *Message, reason string) {
|
||||||
if t != nil {
|
if t != nil {
|
||||||
// TODO
|
// TODO
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user