Add transport interface
This commit is contained in:
parent
b1dafd81b8
commit
c367533a3c
@ -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 {
|
5
node/modules/tracer/transport.go
Normal file
5
node/modules/tracer/transport.go
Normal file
@ -0,0 +1,5 @@
|
||||
package tracer
|
||||
|
||||
type TracerTransport interface {
|
||||
Transport(jsonEvent []byte)
|
||||
}
|
Loading…
Reference in New Issue
Block a user