Documentation
¶
Overview ¶
Package tui is rig's terminal control plane: one screen per concern (services, logs, metrics, traces, queries, key-value, data, load, manifests, hosts), all driven by the same engine as the CLI. Screens load nothing until opened and refresh only while showing; the service list is one runtime call per refresh.
Index ¶
- func Chat(ctx context.Context, a *engine.App, id string) error
- func CloseSession(projectDir, id string) error
- func PickSession(rows [][]string, close func(i int) error) (int, error)
- func Resume(ctx context.Context, open func(env string) (*engine.App, error), ...) error
- func Run(ctx context.Context, a *engine.App) error
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Chat ¶
Chat opens the UI with the assistant's chat open, on conversation id ("" a new one, "last" the newest).
func CloseSession ¶
CloseSession forgets a saved session.
func PickSession ¶
PickSession is `rig resume`'s chooser: rows are id, kind, saved, what; enter picks one, d closes the selected one (through close), q leaves. It returns the picked row, -1 for none.
Types ¶
type Session ¶
type Session struct {
ID string `json:"id"`
Env string `json:"env"`
Created time.Time `json:"created"`
Saved time.Time `json:"saved"`
Tab int `json:"tab"`
TabName string `json:"tab_name,omitempty"`
LogServices []string `json:"log_services,omitempty"`
LogInstances []string `json:"log_instances,omitempty"`
LogGrep string `json:"log_grep,omitempty"`
Queries map[string]*spec.Query `json:"adhoc_queries,omitempty"`
Scheduled map[string]bool `json:"scheduled,omitempty"`
Results map[string]savedResult `json:"results,omitempty"`
Runs []queryRun `json:"runs,omitempty"`
DataPaths map[string][]string `json:"data_paths,omitempty"`
Dashboard int `json:"dashboard,omitempty"`
Load map[string]savedLoadHist `json:"load,omitempty"`
}
Session is what S saves and `rig resume` brings back: the screen, what each screen was showing, and the query results and history of the run.
func ListSessions ¶
ListSessions are the project's saved sessions, newest first, without their results.
func LoadSession ¶
LoadSession reads a saved session of the project; id "" or "last" is the newest.
Source Files
¶
- bigtext.go
- chartview.go
- chat.go
- edit.go
- envinfo.go
- grid.go
- jobs.go
- jsontree.go
- kv_locate.go
- logquery.go
- logtree.go
- logview.go
- manifest_edit.go
- manifest_fields.go
- manifest_search.go
- picker.go
- profile.go
- report.go
- select.go
- session.go
- ship.go
- split.go
- styles.go
- tab_data.go
- tab_hosts.go
- tab_kv.go
- tab_load.go
- tab_logs.go
- tab_manifests.go
- tab_metrics.go
- tab_queries.go
- tab_services.go
- tab_tests.go
- tab_traces.go
- timewindow.go
- tui.go
- watch.go