solo-io / bumblebee

Get eBPF programs running from the cloud to the kernel in 1 line of bash
Apache License 2.0
1.26k stars 78 forks source link

Add TUI #5

Closed lgadban closed 3 years ago

lgadban commented 3 years ago

significant addition of the TUI.

new printer package which receives map entries from the loader and renders the TUI from them.

Lifecycle and concurrency was difficult challenging to retrofit to work with the TUI, high-level summary is all goroutines that are receiving updates (i.e. iterating) from the underlying ebpf maps will use a single channel to send updates to the TUI render loop, which is a single goroutine.

Closing of this channel has to be synchronized with the map goroutines so that we don't end up writing entries to a closed channel or drawing an update to a stopped TUI App, which results in a deadlock