def snapshot.get

mylsm-lsm-store@0.6.0.1 · src/coordinator/ByteClient.bend:272

import mylsm-lsm-store@0.6.0.1/src/coordinator/ByteClient.bend as ByteClient
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/Protocol.bend as Protocol
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes

272# Reads one key through a retained owner snapshot without changing its token.
273def snapshot.get(
274  session: Client.Session,
275  snapshot_id: U32,
276  key: Bytes.Bytes
277) -> IO(Client.Session & Result<&1, &1, Client.Error, Maybe<&1, Bytes.Bytes>>):
278  do IO<Client.Session & Result<&1, &1, Client.Error,
279      Maybe<&1, Bytes.Bytes>>>:
280    pair : Client.Session & Result<&1, &1, Client.Error, Protocol.Response> <-
281      Client.session.call(session, 10, snapshot.get.payload(snapshot_id, key))
282    return get.result(pair)

Uses (14)

Used by (1)