Documentation
¶
Index ¶
- func Run(cfg Config) error
- func RunMonitor(cfg Config) error
- type App
- type Config
- type Router
- func (r *Router) Active() views.ViewComponent
- func (r *Router) Breadcrumb() string
- func (r *Router) Depth() int
- func (r *Router) Pop() tea.Cmd
- func (r *Router) Push(v views.ViewComponent) tea.Cmd
- func (r *Router) Replace(v views.ViewComponent) tea.Cmd
- func (r *Router) SetSize(w, h int)
- func (r *Router) Update(msg tea.Msg) tea.Cmd
- func (r Router) View() tea.View
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunMonitor ¶
RunMonitor launches the TUI in standalone monitor mode. cfg.InitialDashboard selects which dashboard is shown first ("network", "provider", "bme", or "" for the default network).
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App is the root bubbletea model for the akt TUI.
type Config ¶
type Config struct {
Viper *viper.Viper
RPCEndpoint string // resolved from active context; may be empty
RESTEndpoint string // resolved from active context; may be empty
CacheDir string // path to cache directory (e.g. ~/.config/akt/cache)
Insecure bool // skip TLS verification for provider queries
Standalone bool // when true, disables command palette and view switching (e.g. akt monitor)
InitialDashboard string // which monitor dashboard to start on: "network" (default), "provider", "bme"
// Data sources (optional — TUI works in degraded mode without them)
Store store.Store // local deployment store (nil = no store)
ResolvedCtx *aktctx.Context // resolved akt context (nil = no context info)
LightClient aclient.LightClient // chain query client; nil = no chain queries
// Provider auth (optional — nil = no log streaming)
Keyring sdkkeyring.Keyring // keyring for provider auth
ClientCtx sdkclient.Context // SDK client context for provider auth
}
Config holds the parameters needed to start the TUI.
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router manages a navigation stack of ViewComponent values. The active view (top of stack) receives Update() and View() calls. Views below the top are frozen until they become active again via Pop().
func (*Router) Active ¶
func (r *Router) Active() views.ViewComponent
Active returns the top view on the stack, or nil if the stack is empty.
func (*Router) Breadcrumb ¶
Breadcrumb returns the navigation trail by joining all stack views' Breadcrumb() values with " > ".
func (*Router) Pop ¶
Pop removes the top view from the stack. If the stack has only one view (the root), this is a no-op and returns nil.
func (*Router) Push ¶
func (r *Router) Push(v views.ViewComponent) tea.Cmd
Push adds a view to the top of the stack, sets its size, and returns its Init() command.
func (*Router) Replace ¶
func (r *Router) Replace(v views.ViewComponent) tea.Cmd
Replace swaps the top view with a new one, sets its size, and returns its Init() command. If the stack is empty, it behaves like Push.
func (*Router) SetSize ¶
SetSize stores the available dimensions and propagates to the active (top) view only.