mirror of
https://github.com/logos-messaging/go-libp2p-pubsub.git
synced 2026-01-06 23:03:08 +00:00
chore: go fmt and return timecache named import
This commit is contained in:
parent
6035642336
commit
ec5e9b42a9
@ -9,11 +9,11 @@ import (
|
||||
type msgIDGenerator struct {
|
||||
Default MsgIdFunction
|
||||
|
||||
topicGens map[string]MsgIdFunction
|
||||
topicGens map[string]MsgIdFunction
|
||||
topicGensLk sync.RWMutex
|
||||
}
|
||||
|
||||
func newMsgIdGenerator() *msgIDGenerator{
|
||||
func newMsgIdGenerator() *msgIDGenerator {
|
||||
return &msgIDGenerator{
|
||||
Default: DefaultMsgIdFn,
|
||||
topicGens: make(map[string]MsgIdFunction),
|
||||
|
||||
@ -20,7 +20,7 @@ import (
|
||||
"github.com/libp2p/go-libp2p-core/protocol"
|
||||
|
||||
logging "github.com/ipfs/go-log"
|
||||
"github.com/whyrusleeping/timecache"
|
||||
timecache "github.com/whyrusleeping/timecache"
|
||||
)
|
||||
|
||||
// DefaultMaximumMessageSize is 1mb.
|
||||
@ -213,7 +213,7 @@ const (
|
||||
|
||||
type Message struct {
|
||||
*pb.Message
|
||||
ID string
|
||||
ID string
|
||||
ReceivedFrom peer.ID
|
||||
ValidatorData interface{}
|
||||
}
|
||||
|
||||
@ -44,9 +44,9 @@ var (
|
||||
type tagTracer struct {
|
||||
sync.RWMutex
|
||||
|
||||
cmgr connmgr.ConnManager
|
||||
idGen *msgIDGenerator
|
||||
decayer connmgr.Decayer
|
||||
cmgr connmgr.ConnManager
|
||||
idGen *msgIDGenerator
|
||||
decayer connmgr.Decayer
|
||||
decaying map[string]connmgr.DecayingTag
|
||||
direct map[peer.ID]struct{}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user