def Bytes.backup_to.remote.export.opened
mylsm-lsm-store@0.6.0.1 · mylsm.bend:1217
import mylsm-lsm-store@0.6.0.1/mylsm.bend as Mylsm
import Base
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
import mylsm-lsm-store@0.6.0.1/src/coordinator/Protocol.bend as CoordinatorProtocol
1217def Bytes.backup_to.remote.export.opened(
1218 path: String,
1219 handle_session: OwnerClient.Session,
1220 snapshot_id: U32,
1221 entry_count: U32,
1222 opened: OwnerClient.Session & Result<&1, &1, OwnerClient.Error, U32>
1223) -> IO(Bytes.Handle & Result<&1, &1, Bytes.Error, Unit>):
1224 match opened:
1225 case (session, Fail{error}):
1226 Bytes.backup_to.remote.failed(handle_session, snapshot_id,
1227 session, error)
1228 case (session, Done{cursor_id}):
1229 Bytes.backup_to.remote.export.ready.copies(path, handle_session,
1230 BackupOwnerCursorIo.OwnerSource{session, snapshot_id,
1231 cursor_id, True{}},
1232 CoordinatorProtocol.u32.duplicate.triple(entry_count))