libp2p/protocols/pubsub/mcache

    Dark Mode
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: [].}
  Source   Edit
func get(c: MCache; msgId: MessageId): Opt[Message] {....raises: [], tags: [].}
  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: [].}
  Source   Edit
func shift(c: var MCache) {....raises: [], tags: [].}
  Source   Edit
func window(c: MCache; topic: string): HashSet[MessageId] {....raises: [], tags: [].}
  Source   Edit