def encode.readers
mylsm-lsm-store@0.6.0.1 · src/coordinator/OptionsCodec.bend:39
import mylsm-lsm-store@0.6.0.1/src/coordinator/OptionsCodec.bend as OptionsCodec
import Base
import mylsm-lsm-store@0.6.0.1/src/ResourceOptions.bend as ResourceOptions
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes
39def encode.readers(limits: ResourceOptions.ReaderLimits) -> Bytes.Bytes:
40 match limits:
41 case ResourceOptions.ReaderLimits{snapshots, cursors,
42 cursors_per_snapshot, retained_root_bytes, retired_files,
43 index_page_bytes, index_buffer_bytes, restore_bytes}:
44 Bytes.concat([word(snapshots), word(cursors), word(cursors_per_snapshot),
45 word(retained_root_bytes), word(retired_files), word(index_page_bytes),
46 word(index_buffer_bytes), word(restore_bytes)])