def Bytes.backup_to.remote.export.ready
mylsm-lsm-store@0.6.0.1 · mylsm.bend:1192
import mylsm-lsm-store@0.6.0.1/mylsm.bend as Mylsm
import Base
import mylsm-lsm-store@0.6.0.1/src/transfer/BackupIo.bend as BackupIo
import mylsm-lsm-store@0.6.0.1/src/transfer/BackupOwnerCursorIo.bend as BackupOwnerCursorIo
import mylsm-lsm-store@0.6.0.1/src/coordinator/Client.bend as OwnerClient
1192def Bytes.backup_to.remote.export.ready(
1193 path: String,
1194 handle_session: OwnerClient.Session,
1195 source: BackupOwnerCursorIo.OwnerSource,
1196 counts: U32 & U32
1197) -> IO(Bytes.Handle & Result<&1, &1, Bytes.Error, Unit>):
1198 match counts:
1199 case (entries, fuel_entries):
1200 do IO<Bytes.Handle & Result<&1, &1, Bytes.Error, Unit>>:
1201 result : Result<&1, &1, BackupIo.Error, Unit> <-
1202 BackupOwnerCursorIo.export(path, source, U32.to_nat(entries),
1203 Nat.add(32n, Nat.mul(8n, U32.to_nat(fuel_entries))))
1204 Bytes.backup_to.remote.exported(handle_session, result)