def source.step.cloned

mylsm-lsm-store@0.6.0.1 · src/transfer/BackupOwnerCursorIo.bend:118

import mylsm-lsm-store@0.6.0.1/src/transfer/BackupOwnerCursorIo.bend as BackupOwnerCursorIo
import Base
import mylsm-lsm-store@0.6.0.1/src/coordinator/Client.bend as Client
import mylsm-lsm-store@0.6.0.1/src/coordinator/ByteClient.bend as ByteClient
import mylsm-lsm-store@0.6.0.1/src/coordinator/CursorCodec.bend as CursorCodec
import mylsm-lsm-store@0.6.0.1/src/transfer/BackupCursor.bend as BackupCursor

118def source.step.cloned(
119  file: File,
120  stream: BackupCursor.Stream,
121  sources: OwnerSource & OwnerSource
122) -> IO(State):
123  match sources:
124    case (request_source, retained_source):
125      match request_source:
126        case OwnerSource{session, _, cursor_id, _}:
127          do IO<State>:
128            pair : Client.Session &
129              Result<&1, &1, Client.Error, CursorCodec.Frame> <-
130                ByteClient.snapshot.cursor.next(session, cursor_id)
131            return source.step.state(file,
132              source.step.result(retained_source, stream, pair))

Uses (16)

Used by (1)