Method
tail
(&self, sandbox_id: &str, max: usize)
Source from the content-addressed store, hash-verified
| 86 | } |
| 87 | |
| 88 | pub fn tail(&self, sandbox_id: &str, max: usize) -> Vec<SandboxStreamEvent> { |
| 89 | let inner = self.inner.lock().expect("tracing bus lock poisoned"); |
| 90 | inner |
| 91 | .tails |
| 92 | .get(sandbox_id) |
| 93 | .map(|d| d.iter().rev().take(max).cloned().collect::<Vec<_>>()) |
| 94 | .unwrap_or_default() |
| 95 | .into_iter() |
| 96 | .rev() |
| 97 | .collect() |
| 98 | } |
| 99 | |
| 100 | /// Publish a log line from an external source (e.g., sandbox push). |
| 101 | /// |