libp2p/protocols/kademlia/put

Search:
Group by:
Source   Edit  

Procs

proc canStoreLocalRecord(kad: KadDHT; key: Key): bool {....raises: [], tags: [],
    forbids: [].}
Source   Edit  
proc dispatchPutVal(kad: KadDHT; peer: PeerId; key: Key; value: seq[byte]): InternalRaisesFuture[
    Result[void, string], (CancelledError,)] {....stackTrace: false, raises: [],
    gcsafe, tags: [RootEffect], forbids: [].}
Source   Edit  
proc handlePutValue(kad: KadDHT; stream: Stream; msg: Message): InternalRaisesFuture[
    void, (CancelledError,)] {....stackTrace: false, raises: [], gcsafe,
                               tags: [RootEffect], forbids: [].}
Source   Edit  
proc isExpired(record: EntryRecord; interval: chronos.Duration;
               currentUnixSeconds = nowUnixSeconds()): bool {....gcsafe,
    raises: [], tags: [TimeEffect, RootEffect, WriteIOEffect], forbids: [].}
Returns true when the record's stored timestamp is older than interval. Records whose timestamp cannot be parsed are treated as expired. Source   Edit  
proc manageExpiredRecords(kad: KadDHT): InternalRaisesFuture[void,
    (CancelledError,)] {....stackTrace: false, raises: [], gcsafe,
                         tags: [RootEffect], forbids: [].}
Periodically scans dataTable and evicts entries that are older than config.recordExpirationInterval. Runs indefinitely as a heartbeat loop until cancelled (e.g. via cancelSoon or cancelAndWait). Source   Edit  
proc putValue(kad: KadDHT; key: Key; value: seq[byte]): InternalRaisesFuture[
    Result[void, string], (CancelledError,)] {....gcsafe, stackTrace: false,
    raises: [], gcsafe, tags: [RootEffect], forbids: [].}
Source   Edit