mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-05-31 14:49:28 +00:00
21 lines
578 B
Nim
21 lines
578 B
Nim
|
|
## Persistence backend interface for segmentation reassembly state.
|
||
|
|
##
|
||
|
|
## Allows partial reassembly state to survive process restarts.
|
||
|
|
|
||
|
|
type
|
||
|
|
SegmentationPersistenceKind* {.pure.} = enum
|
||
|
|
InMemory
|
||
|
|
Sqlite
|
||
|
|
|
||
|
|
SegmentationPersistence* = ref object of RootObj
|
||
|
|
kind*: SegmentationPersistenceKind
|
||
|
|
|
||
|
|
method put*(self: SegmentationPersistence, key: seq[byte], value: seq[byte]) {.base.} =
|
||
|
|
discard
|
||
|
|
|
||
|
|
method get*(self: SegmentationPersistence, key: seq[byte]): seq[byte] {.base.} =
|
||
|
|
discard
|
||
|
|
|
||
|
|
method delete*(self: SegmentationPersistence, key: seq[byte]) {.base.} =
|
||
|
|
discard
|