mirror of
https://github.com/vacp2p/nim-libp2p-experimental.git
synced 2025-01-12 19:34:23 +00:00
reexport public types (#872)
This commit is contained in:
parent
c1a3bd8fee
commit
e573238705
@ -12,7 +12,7 @@ when (NimMajor, NimMinor) < (1, 4):
|
|||||||
else:
|
else:
|
||||||
{.push raises: [].}
|
{.push raises: [].}
|
||||||
|
|
||||||
import std/[sequtils, sets, hashes, tables]
|
import std/[sets, hashes, tables]
|
||||||
import chronos, chronicles, metrics
|
import chronos, chronicles, metrics
|
||||||
import ./pubsub,
|
import ./pubsub,
|
||||||
./pubsubpeer,
|
./pubsubpeer,
|
||||||
|
@ -14,7 +14,7 @@ when (NimMajor, NimMinor) < (1, 4):
|
|||||||
else:
|
else:
|
||||||
{.push raises: [].}
|
{.push raises: [].}
|
||||||
|
|
||||||
import std/[tables, sets, options, sequtils]
|
import std/[sets, sequtils]
|
||||||
import chronos, chronicles, metrics
|
import chronos, chronicles, metrics
|
||||||
import ./pubsub,
|
import ./pubsub,
|
||||||
./floodsub,
|
./floodsub,
|
||||||
|
@ -13,11 +13,13 @@ else:
|
|||||||
{.push raises: [].}
|
{.push raises: [].}
|
||||||
|
|
||||||
import chronos
|
import chronos
|
||||||
import std/[tables, sets]
|
import std/[options, tables, sets]
|
||||||
import ".."/[floodsub, peertable, mcache, pubsubpeer]
|
import ".."/[floodsub, peertable, mcache, pubsubpeer]
|
||||||
import "../rpc"/[messages]
|
import "../rpc"/[messages]
|
||||||
import "../../.."/[peerid, multiaddress, utility]
|
import "../../.."/[peerid, multiaddress, utility]
|
||||||
|
|
||||||
|
export options, tables, sets
|
||||||
|
|
||||||
const
|
const
|
||||||
GossipSubCodec* = "/meshsub/1.1.0"
|
GossipSubCodec* = "/meshsub/1.1.0"
|
||||||
GossipSubCodec_10* = "/meshsub/1.0.0"
|
GossipSubCodec_10* = "/meshsub/1.0.0"
|
||||||
|
@ -15,6 +15,8 @@ else:
|
|||||||
import std/[tables, sets]
|
import std/[tables, sets]
|
||||||
import ./pubsubpeer, ../../peerid
|
import ./pubsubpeer, ../../peerid
|
||||||
|
|
||||||
|
export tables, sets
|
||||||
|
|
||||||
type
|
type
|
||||||
PeerTable* = Table[string, HashSet[PubSubPeer]] # topic string to peer map
|
PeerTable* = Table[string, HashSet[PubSubPeer]] # topic string to peer map
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@ import metrics
|
|||||||
import stew/results
|
import stew/results
|
||||||
export results
|
export results
|
||||||
|
|
||||||
|
export tables, sets
|
||||||
export PubSubPeer
|
export PubSubPeer
|
||||||
export PubSubObserver
|
export PubSubObserver
|
||||||
export protocol
|
export protocol
|
||||||
@ -118,7 +119,7 @@ type
|
|||||||
anonymize*: bool ## if we omit fromPeer and seqno from RPC messages we send
|
anonymize*: bool ## if we omit fromPeer and seqno from RPC messages we send
|
||||||
subscriptionValidator*: SubscriptionValidator # callback used to validate subscriptions
|
subscriptionValidator*: SubscriptionValidator # callback used to validate subscriptions
|
||||||
topicsHigh*: int ## the maximum number of topics a peer is allowed to subscribe to
|
topicsHigh*: int ## the maximum number of topics a peer is allowed to subscribe to
|
||||||
maxMessageSize*: int ##\
|
maxMessageSize*: int ##\
|
||||||
## the maximum raw message size we'll globally allow
|
## the maximum raw message size we'll globally allow
|
||||||
## for finer tuning, check message size on topic validator
|
## for finer tuning, check message size on topic validator
|
||||||
##
|
##
|
||||||
|
Loading…
x
Reference in New Issue
Block a user