venator_engine

Trait Storage

Source
pub trait Storage {
Show 23 methods // Required methods fn get_connection(&self, at: Timestamp) -> Option<Boo<'_, Connection>>; fn get_span(&self, at: Timestamp) -> Option<Boo<'_, Span>>; fn get_span_event(&self, at: Timestamp) -> Option<Boo<'_, SpanEvent>>; fn get_event(&self, at: Timestamp) -> Option<Boo<'_, Event>>; fn get_all_connections( &self, ) -> Box<dyn Iterator<Item = Boo<'_, Connection>> + '_>; fn get_all_spans(&self) -> Box<dyn Iterator<Item = Boo<'_, Span>> + '_>; fn get_all_span_events( &self, ) -> Box<dyn Iterator<Item = Boo<'_, SpanEvent>> + '_>; fn get_all_events(&self) -> Box<dyn Iterator<Item = Boo<'_, Event>> + '_>; fn get_all_indexes(&self) -> Box<dyn Iterator<Item = Boo<'_, String>> + '_>; fn insert_connection(&mut self, connection: Connection); fn insert_span(&mut self, span: Span); fn insert_span_event(&mut self, span_event: SpanEvent); fn insert_event(&mut self, event: Event); fn insert_index(&mut self, name: String); fn update_connection_disconnected( &mut self, at: Timestamp, disconnected: Timestamp, ); fn update_span_closed(&mut self, at: Timestamp, closed: Timestamp); fn update_span_fields( &mut self, at: Timestamp, fields: BTreeMap<String, Value>, ); fn update_span_follows(&mut self, at: Timestamp, follows: SpanKey); fn drop_connections(&mut self, connections: &[Timestamp]); fn drop_spans(&mut self, spans: &[Timestamp]); fn drop_span_events(&mut self, span_events: &[Timestamp]); fn drop_events(&mut self, events: &[Timestamp]); fn drop_index(&mut self, name: &str);
}
Expand description

This reflects the backing storage of spans, events, and span events. This (currently) does not store indexes; they are re-created on startup.

This interface enforces that elements are directly accessible by their timestamp (created_at for spans) and that those timestamps are unique.

The get all methods are used to load on startup, and backfill new indexes.

Required Methods§

Source

fn get_connection(&self, at: Timestamp) -> Option<Boo<'_, Connection>>

Source

fn get_span(&self, at: Timestamp) -> Option<Boo<'_, Span>>

Source

fn get_span_event(&self, at: Timestamp) -> Option<Boo<'_, SpanEvent>>

Source

fn get_event(&self, at: Timestamp) -> Option<Boo<'_, Event>>

Source

fn get_all_connections( &self, ) -> Box<dyn Iterator<Item = Boo<'_, Connection>> + '_>

Source

fn get_all_spans(&self) -> Box<dyn Iterator<Item = Boo<'_, Span>> + '_>

Source

fn get_all_span_events( &self, ) -> Box<dyn Iterator<Item = Boo<'_, SpanEvent>> + '_>

Source

fn get_all_events(&self) -> Box<dyn Iterator<Item = Boo<'_, Event>> + '_>

Source

fn get_all_indexes(&self) -> Box<dyn Iterator<Item = Boo<'_, String>> + '_>

Source

fn insert_connection(&mut self, connection: Connection)

Source

fn insert_span(&mut self, span: Span)

Source

fn insert_span_event(&mut self, span_event: SpanEvent)

Source

fn insert_event(&mut self, event: Event)

Source

fn insert_index(&mut self, name: String)

Source

fn update_connection_disconnected( &mut self, at: Timestamp, disconnected: Timestamp, )

Source

fn update_span_closed(&mut self, at: Timestamp, closed: Timestamp)

Source

fn update_span_fields(&mut self, at: Timestamp, fields: BTreeMap<String, Value>)

Source

fn update_span_follows(&mut self, at: Timestamp, follows: SpanKey)

Source

fn drop_connections(&mut self, connections: &[Timestamp])

Source

fn drop_spans(&mut self, spans: &[Timestamp])

Source

fn drop_span_events(&mut self, span_events: &[Timestamp])

Source

fn drop_events(&mut self, events: &[Timestamp])

Source

fn drop_index(&mut self, name: &str)

Implementors§