MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / make_event

Function make_event

nodedb/src/event/consumer.rs:434–451  ·  view source on GitHub ↗
(seq: u64)

Source from the content-addressed store, hash-verified

432 use crate::types::{TenantId, VShardId};
433
434 fn make_event(seq: u64) -> super::super::types::WriteEvent {
435 super::super::types::WriteEvent {
436 sequence: seq,
437 collection: Arc::from("test"),
438 op: WriteOp::Insert,
439 row_id: RowId::new("row-1"),
440 lsn: Lsn::new(seq * 10),
441 tenant_id: TenantId::new(1),
442 vshard_id: VShardId::new(0),
443 source: EventSource::User,
444 new_value: Some(Arc::from(b"data".as_slice())),
445 old_value: None,
446 system_time_ms: None,
447 valid_time_ms: None,
448 user_id: None,
449 statement_digest: None,
450 }
451 }
452
453 #[test]
454 fn gap_detection() {

Callers 2

gap_detectionFunction · 0.70

Calls 1

as_sliceMethod · 0.45

Tested by 1

gap_detectionFunction · 0.56