Skip to main content

trusted_floor

Function trusted_floor 

Source
pub fn trusted_floor(
    checkpoint: &Checkpoint,
    stream: &str,
    stream_created_unix_ns: i64,
    stream_last_seq: u64,
    subject: &str,
) -> Result<u64, String>
Expand description

Decides whether a saved checkpoint can be used for the stream as it is now.

§Arguments

  • checkpoint - Saved checkpoint.
  • stream - Current stream name.
  • stream_created_unix_ns - Current stream creation time.
  • stream_last_seq - Current last sequence of the stream.
  • subject - Current channel subject.

§Returns

The trusted floor, or the reason the checkpoint is ignored.