libp2p/protocols/pubsub/mcache

Search:
Group by:
Source   Edit  

Types

CacheEntry = object
  msgId*: MessageId
  topic*: string
Source   Edit  
MCache = object of RootObj
  msgs*: Table[MessageId, Message]
  history*: seq[seq[CacheEntry]]
  pos*: int
  windowSize*: Natural
Source   Edit  

Procs

func contains(c: MCache; msgId: MessageId): bool {....raises: [], tags: [],
    forbids: [].}
Source   Edit  
func get(c: MCache; msgId: MessageId): Opt[Message] {....raises: [], tags: [],
    forbids: [].}
Source   Edit  
func init(T: type MCache; window, history: Natural): T:type {....raises: [].}
Source   Edit  
func put(c: var MCache; msgId: MessageId; msg: Message) {....raises: [], tags: [],
    forbids: [].}
Source   Edit  
func shift(c: var MCache) {....raises: [], tags: [], forbids: [].}
Source   Edit  
func window(c: MCache; topic: string): HashSet[MessageId] {....raises: [],
    tags: [], forbids: [].}
Source   Edit