diff --git a/node/modules/lp2p/tracer.go b/node/modules/tracer/tracer.go similarity index 75% rename from node/modules/lp2p/tracer.go rename to node/modules/tracer/tracer.go index 36dd6d456..a19ae065d 100644 --- a/node/modules/lp2p/tracer.go +++ b/node/modules/tracer/tracer.go @@ -1,4 +1,4 @@ -package lp2p +package tracer import ( peer "github.com/libp2p/go-libp2p-core/peer" @@ -6,14 +6,16 @@ import ( pubsub_pb "github.com/libp2p/go-libp2p-pubsub/pb" ) -func newLotusTracer(tr pubsub.EventTracer) LotusTracer { +func newLotusTracer(et pubsub.EventTracer, tt TracerTransport) LotusTracer { return &lotusTracer{ - tr: tr, + et: et, + tt: tt, } } type lotusTracer struct { - tr pubsub.EventTracer + et pubsub.EventTracer + tt TracerTransport } type LotusTracer interface { diff --git a/node/modules/tracer/transport.go b/node/modules/tracer/transport.go new file mode 100644 index 000000000..73ef80690 --- /dev/null +++ b/node/modules/tracer/transport.go @@ -0,0 +1,5 @@ +package tracer + +type TracerTransport interface { + Transport(jsonEvent []byte) +}