MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / reserve_turn

Method reserve_turn

libatomic/src/daemon/journal_sink.rs:148–162  ·  view source on GitHub ↗
(
        &self,
        session_id: &str,
        turn_number: u32,
        now: i64,
    )

Source from the content-addressed store, hash-verified

146
147impl ProvenanceJournalSink for DirectJournalSink {
148 fn reserve_turn(
149 &self,
150 session_id: &str,
151 turn_number: u32,
152 now: i64,
153 ) -> Result<JournalTurnReservation, String> {
154 let turn = self
155 .store()?
156 .reserve_provenance_turn(session_id, turn_number, now)
157 .map_err(|error| error.to_string())?;
158 Ok(JournalTurnReservation {
159 provenance_id: turn.provenance_id.get(),
160 generation: turn.generation,
161 })
162 }
163
164 fn append(
165 &self,

Callers

nothing calls this directly

Calls 3

getMethod · 0.65
storeMethod · 0.45

Tested by

no test coverage detected