mirror of https://github.com/vacp2p/nim-libp2p.git
proper name for topics so that we can filter dynamically using chronicles (#210)
* proper name for topics so that we can filter dynamically using chronicles * lowercase
This commit is contained in:
parent
8d9e231a74
commit
1afec627c2
|
@ -20,7 +20,7 @@ when chronicles.enabledLogLevel == LogLevel.TRACE:
|
|||
export lpstream
|
||||
|
||||
logScope:
|
||||
topic = "Connection"
|
||||
topics = "connection"
|
||||
|
||||
const
|
||||
ConnectionTrackerName* = "libp2p.connection"
|
||||
|
|
|
@ -15,7 +15,7 @@ import connection,
|
|||
protocols/protocol
|
||||
|
||||
logScope:
|
||||
topic = "Multistream"
|
||||
topics = "multistream"
|
||||
|
||||
const
|
||||
MsgSize* = 64*1024
|
||||
|
|
|
@ -17,7 +17,7 @@ import types,
|
|||
../../stream/lpstream
|
||||
|
||||
logScope:
|
||||
topic = "MplexCoder"
|
||||
topics = "mplexcoder"
|
||||
|
||||
type
|
||||
Msg* = tuple
|
||||
|
|
|
@ -21,7 +21,7 @@ import types,
|
|||
export lpstream
|
||||
|
||||
logScope:
|
||||
topic = "MplexChannel"
|
||||
topics = "mplexchannel"
|
||||
|
||||
## Channel half-closed states
|
||||
##
|
||||
|
|
|
@ -20,7 +20,7 @@ import ../muxer,
|
|||
lpchannel
|
||||
|
||||
logScope:
|
||||
topic = "Mplex"
|
||||
topics = "mplex"
|
||||
|
||||
type
|
||||
Mplex* = ref object of Muxer
|
||||
|
|
|
@ -13,7 +13,7 @@ import ../protocols/protocol,
|
|||
../errors
|
||||
|
||||
logScope:
|
||||
topic = "Muxer"
|
||||
topics = "muxer"
|
||||
|
||||
type
|
||||
StreamHandler* = proc(conn: Connection): Future[void] {.gcsafe.}
|
||||
|
|
|
@ -19,7 +19,7 @@ import ../protobuf/minprotobuf,
|
|||
../utility
|
||||
|
||||
logScope:
|
||||
topic = "Identify"
|
||||
topics = "identify"
|
||||
|
||||
const
|
||||
IdentifyCodec* = "/ipfs/id/1.0.0"
|
||||
|
|
|
@ -21,7 +21,7 @@ import pubsub,
|
|||
../../errors
|
||||
|
||||
logScope:
|
||||
topic = "FloodSub"
|
||||
topics = "floodsub"
|
||||
|
||||
const FloodSubCodec* = "/floodsub/1.0.0"
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ import pubsub,
|
|||
../../utility
|
||||
|
||||
logScope:
|
||||
topic = "GossipSub"
|
||||
topics = "gossipsub"
|
||||
|
||||
const GossipSubCodec* = "/meshsub/1.0.0"
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ export PubSubPeer
|
|||
export PubSubObserver
|
||||
|
||||
logScope:
|
||||
topic = "PubSub"
|
||||
topics = "pubsub"
|
||||
|
||||
declareGauge(libp2p_pubsub_peers, "pubsub peer instances")
|
||||
declareGauge(libp2p_pubsub_topics, "pubsub subscribed topics")
|
||||
|
|
|
@ -21,7 +21,7 @@ import rpc/[messages, message, protobuf],
|
|||
import metrics
|
||||
|
||||
logScope:
|
||||
topic = "PubSubPeer"
|
||||
topics = "pubsubpeer"
|
||||
|
||||
type
|
||||
PubSubObserver* = ref object
|
||||
|
|
|
@ -18,7 +18,7 @@ import messages, protobuf,
|
|||
../../../protobuf/minprotobuf
|
||||
|
||||
logScope:
|
||||
topic = "PubSubMessage"
|
||||
topics = "pubsubmessage"
|
||||
|
||||
const PubSubPrefix = "libp2p-pubsub:"
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import tables
|
|||
import chronos, chronicles
|
||||
|
||||
logScope:
|
||||
topic = "TimedCache"
|
||||
topics = "timedcache"
|
||||
|
||||
const Timeout* = 10.seconds # default timeout in ms
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ import secure,
|
|||
../../stream/bufferstream
|
||||
|
||||
logScope:
|
||||
topic = "noise"
|
||||
topics = "noise"
|
||||
|
||||
const
|
||||
# https://godoc.org/github.com/libp2p/go-libp2p-noise#pkg-constants
|
||||
|
|
|
@ -19,7 +19,7 @@ import secure,
|
|||
export hmac, sha2, sha, hash, rijndael, bcmode
|
||||
|
||||
logScope:
|
||||
topic = "secio"
|
||||
topics = "secio"
|
||||
|
||||
const
|
||||
SecioCodec* = "/secio/1.0.0"
|
||||
|
|
|
@ -40,7 +40,7 @@ when chronicles.enabledLogLevel == LogLevel.TRACE:
|
|||
export lpstream
|
||||
|
||||
logScope:
|
||||
topic = "BufferStream"
|
||||
topics = "bufferstream"
|
||||
|
||||
declareGauge libp2p_open_bufferstream, "open BufferStream instances"
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import chronos, chronicles
|
|||
import lpstream, ../utility
|
||||
|
||||
logScope:
|
||||
topic = "ChronosStream"
|
||||
topics = "chronosstream"
|
||||
|
||||
type ChronosStream* = ref object of LPStream
|
||||
client: StreamTransport
|
||||
|
|
|
@ -23,7 +23,7 @@ import connection,
|
|||
peer
|
||||
|
||||
logScope:
|
||||
topic = "Switch"
|
||||
topics = "switch"
|
||||
|
||||
#TODO: General note - use a finite state machine to manage the different
|
||||
# steps of connections establishing and upgrading. This makes everything
|
||||
|
|
|
@ -18,7 +18,7 @@ import transport,
|
|||
../stream/chronosstream
|
||||
|
||||
logScope:
|
||||
topic = "TcpTransport"
|
||||
topics = "tcptransport"
|
||||
|
||||
const
|
||||
TcpTransportTrackerName* = "libp2p.tcptransport"
|
||||
|
|
Loading…
Reference in New Issue