Types
DropConn = proc (peer: PubSubPeer) {....gcsafe, raises: [Defect].}
- Source Edit
GetConn = proc (): Future[Connection] {....gcsafe, raises: [Defect].}
- Source Edit
OnEvent = proc (peer: PubSubPeer; event: PubSubPeerEvent) {....gcsafe, raises: [Defect].}
- Source Edit
PubSubObserver = ref object onRecv*: proc (peer: PubSubPeer; msgs: var RPCMsg) {....gcsafe, raises: [Defect].} onSend*: proc (peer: PubSubPeer; msgs: var RPCMsg) {....gcsafe, raises: [Defect].}
- Source Edit
PubSubPeer = ref object of RootObj getConn*: GetConn dropConn*: DropConn onEvent*: OnEvent codec*: string sendConn*: Connection address*: Option[MultiAddress] peerId*: PeerId handler*: RPCHandler observers*: ref seq[PubSubObserver] score*: float64 iWantBudget*: int iHaveBudget*: int maxMessageSize: int appScore*: float64 behaviourPenalty*: float64 when defined(libp2p_agents_metrics): shortAgent*: string
- Source Edit
PubSubPeerEvent = object kind*: PubSubPeerEventKind
- Source Edit
PubSubPeerEventKind {.pure.} = enum Connected, Disconnected
- Source Edit
RPCHandler = proc (peer: PubSubPeer; msg: RPCMsg): Future[void] {....gcsafe, raises: [Defect].}
- Source Edit
Procs
func `==`(a, b: PubSubPeer): bool {....raises: [], tags: [].}
- Source Edit
proc connect(p: PubSubPeer) {....raises: [], tags: [RootEffect].}
- Source Edit
proc connected(p: PubSubPeer): bool {....raises: [], tags: [].}
- Source Edit
proc handle(p: PubSubPeer; conn: Connection): Future[void] {.stackTrace: false, ...gcsafe, raises: [], raises: [], tags: [RootEffect].}
- Source Edit
func hash(p: PubSubPeer): Hash {....raises: [], tags: [].}
- Source Edit
proc hasObservers(p: PubSubPeer): bool {....raises: [], tags: [].}
- Source Edit
proc new(T: typedesc[PubSubPeer]; peerId: PeerId; getConn: GetConn; dropConn: DropConn; onEvent: OnEvent; codec: string; maxMessageSize: int): T:type {....raises: [].}
- Source Edit
func outbound(p: PubSubPeer): bool {....raises: [], tags: [].}
- Source Edit
proc send(p: PubSubPeer; msg: RPCMsg; anonymize: bool) {....raises: [Defect], raises: [], tags: [RootEffect, WriteIOEffect, TimeEffect].}
- Source Edit
proc sendEncoded(p: PubSubPeer; msg: seq[byte]) {....raises: [Defect], raises: [], tags: [WriteIOEffect, TimeEffect, RootEffect].}
- Source Edit
func shortLog(p: PubSubPeer): string {....raises: [], tags: [].}
- Source Edit
Templates
template formatItIMPL(it: PubSubPeer): auto
- Source Edit
Exports
-
formatItIMPL, hash, init, getField, shortLog, >=, getBytes, shortLog, write, $, init, public, shortLog, PeerId, ==, toBytes, <=, match, hex, init, write, init, validate, init, init, hasPublicKey, match, <, >, len, maxInlineKeyLength, cmp, extractPublicKey, newLPStreamWriteError, getProtoHeader, shortLog, init, random, $, MaError, ephemeral, MaPatternOp, HTTP, initVBuffer, getProtoHeader, MaxSizeError, ProtoHeader, ==, getLen, ECDHEScheme, shortLog, isUpgraded, closed, [], shuffle, random, init, VBuffer, Secret, peekVarint, random, $, validate, mapOr, init, maxInlineKeyLength, TranscoderDNS, QUIC, [], init, ephemeral, getRequiredField, getField, supported, getWrapped, getBytes, public, MAKind, write, write, init, getField, checkFieldNumber, init, getRepeatedField, matchPartial, getBytes, len, ==, init, readLp, init, initVBuffer, atEof, peekSeq, payloadType, <=, LPStreamError, init, decode, IP, protoAddress, newRng, DefaultConnectionTimeout, checkValid, getPublicKey, decodeProposal, len, CircuitRelay, extractPublicKey, mapAnd, new, verify, new, newLPStreamEOFError, ==, DNSADDR, hash, init, write, WSS, LPStream, writePacked, init, init, writeLpX, readSeq, toBytes, shortLog, encode, TranscoderIP4, init, protoName, toRawBytes, TranscoderIP6Zone, $, initProtoBuffer, newLPStreamReadError, init, match, writeLPVarint, CryptoResult, ProtoResult, WebRTCDirect, init, UDP, TranscoderOnion, StreamTracker, write, init, finish, isEmpty, writeArray, writeLp, shcopy, LPStreamIncompleteError, PeerId, LPStreamEOFError, IP6, shortLog, initVBuffer, decode, ProtoFlags, PKScheme, TimeoutHandler, payload, stretchKeys, Connection, write, TCP, PrivateKey, getBytes, write, &=, PeerInfoError, hash, newLPStreamClosedError, close, initProtoBuffer, toException, DNS, MAProtocol, upgrade, UTP, goffset, getRawBytes, >, KeyPair, init, high, toString, cmp, init, SupportedWireTypes, readOnceX, formatItIMPL, formatItIMPL, formatItIMPL, Signature, formatItIMPL, toBytes, DigestSheme, IPFS, readOnce, init, isEmpty, MultiAddress, ProtoScalar, shortLog, LPStreamIncorrectDefect, hex, protocols, HTTPS, tryAndWarn, len, LPError, getPtr, write, sign, encode, MaResult, init, ProtoField, toBytes, writeSeq, init, &, DNS6, closeX, IpTransportProtocol, toOpenArray, init, allFuturesThrowing, IP4, TranscoderPort, isEnough, write, getField, DNSANY, createExchange, >=, init, mac, payloadDomain, $, LPStreamLimitError, libp2p_pki_schemes, SignedPayload, finish, closeImpl, toBytes, newLPStreamLimitError, write, keyOpenArray, match, $, closeImpl, isEmpty, LPStreamReadError, getRequiredRepeatedField, init, newLPStreamIncompleteError, newLPStreamReadError, initProtoBuffer, getPackedRepeatedField, initStream, contains, shortLog, DNS4, readArray, selectBest, newLPStreamIncorrectDefect, P2PPattern, Envelope, hasPublicKey, toException, init, isEnough, Reliable, hex, ProtoBuffer, write, decode, WS, readVarint, encode, init, init, init, getField, match, getField, <, iv, onUpgrade, readLine, Eof, CryptoError, getField, append, MaPattern, vsizeof, init, peekArray, UNIX, PeerRecord, key, SupportedSchemes, update, getRepeatedField, LPStreamWriteError, getField, RsaDefaultKeySize, writeX, hash, Unreliable, SupportedSchemesInt, random, checkFutures, macOpenArray, init, validate, $, protoCode, mapEq, getField, init, write, LPStreamTrackerName, concat, TranscoderP2P, PeerInfo, AddressInfo, ConnectionTrackerName, TranscoderIP6, init, write, EnvelopeError, encode, WebSockets, MaxMessageSize, createProposal, MaPatResult, Direction, init, InvalidVarintError, shortLog, ==, init, write, getBytes, write, readLpX, PublicKey, writeLp, writePBVarint, ProtoFieldKind, readExactly, protoArgument, getRepeatedField, ProtoError, init, initStream, getField, readVarint, writeLpX, ivOpenArray, closeWithEOF, orError, decodeExchange, getField, MaInvalidAddress, LPStreamClosedError, writeVarint, items, write, getOrder, [], TranscoderUnix, SignedPeerRecord, join