chore: go fmt and return timecache named import

This commit is contained in:
Wondertan 2022-01-09 18:41:10 +02:00 committed by vyzo
parent 6035642336
commit ec5e9b42a9
3 changed files with 7 additions and 7 deletions

View File

@ -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),

View File

@ -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{}
}

View File

@ -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{}