Building the Interactive Interface
Now that you have the widgets and layout ready, let’s put everything together to create an app that launches and manages the interface. Termdash provides two ways to run dashboard applications:
-
termdash.Run: Starts and manages the application automatically. Using this function, Termdash periodically redraws the screen and handles resizing for you.
-
termdash.NewController: Creates a new instance of termdash.Controller that allows you to manually manage your application’s redrawing and resizing processes.
It’s easier to get started with Termdash by using termdash.Run since Termdash manages the application for you. But due to the periodic screen redraw, it continuously consumes system resources. This is fine ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access