summaryrefslogtreecommitdiff
path: root/internal/tui/messages/messages.go
blob: 9826e25e8e124ae54a6020eda1146e8c4d70d07b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package messages

import (
	"ior/internal/globalfilter"
	"ior/internal/statsengine"
)

// PidSelectedMsg is emitted when the user selects a PID from the process table.
type PidSelectedMsg struct {
	Pid int
}

// TidSelectedMsg is emitted when the user selects a TID from the thread table.
type TidSelectedMsg struct {
	Pid int
	Tid int
}

// StatsTickMsg carries a fresh immutable snapshot from the stats engine.
type StatsTickMsg struct {
	Snap *statsengine.Snapshot
}

// ExportRequestMsg requests an export of the current UI state.
type ExportRequestMsg struct{}

// GlobalFilterRequestedMsg requests applying a new shared TUI filter.
type GlobalFilterRequestedMsg struct {
	Filter globalfilter.Filter
	Action string
}

// GlobalFilterUndoRequestedMsg requests popping the latest shared filter layer.
type GlobalFilterUndoRequestedMsg struct{}

// TracingStartedMsg signals that tracing started successfully.
type TracingStartedMsg struct{}

// TracingErrorMsg reports an error while starting or running tracing.
type TracingErrorMsg struct {
	Err error
}