def response.length.admitted

mylsm-lsm-store@0.6.0.1 · src/coordinator/Io.bend:660

import mylsm-lsm-store@0.6.0.1/src/coordinator/Io.bend as Io
import Base
import mylsm-lsm-store@0.6.0.1/src/coordinator/Protocol.bend as Protocol
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes

660def response.length.admitted(
661  file: File,
662  header: Bytes.Bytes,
663  length: U32,
664  admitted: Bool
665) -> IO(File & Result<&1, &1, Error, Protocol.Response>):
666  match admitted:
667    case True{}: response.payload(file, header, length)
668    case False{}:
669      IO.pure(File & Result<&1, &1, Error, Protocol.Response>,
670        (file, Fail{FrameTooLarge{}}))

Uses (12)

Used by (1)