SnoopCore
object SnoopCore
Central, DI-agnostic entry point that the capture adapters (Ktor, analytics) write to and the UI reads from. Holds the single shared SnoopStore. Adapters never reference the UI or each other — they only talk to this bridge, keeping capture, storage and UI fully decoupled.
Functions
Link copied to clipboard
fun configure(capacity: Int = store.capacity, maxTotalBytes: Long = store.maxTotalBytes, title: String = this.title)
Reconfigure the store limits and the name the viewers show. Changing the limits clears existing entries — set them before traffic starts; changing the title leaves the store alone. The store and its StateFlow survive, so already-attached collectors (Compose UI, SSE) keep working. reset restores the defaults.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard