app

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ColorPrimary   = ui.ColorPrimary
	ColorSecondary = ui.ColorSecondary
	ColorAccent    = ui.ColorAccent
	ColorSuccess   = ui.ColorSuccess
	ColorWarning   = ui.ColorWarning
	ColorDanger    = ui.ColorDanger
	ColorMuted     = ui.ColorMuted
	ColorBg        = ui.ColorBg
	ColorFg        = ui.ColorFg

	TitleStyle     = ui.TitleStyle
	SectionStyle   = ui.SectionStyle
	StatusBarStyle = ui.StatusBarStyle
	LabelStyle     = ui.LabelStyle
	ValueStyle     = ui.ValueStyle
)

Re-export theme constants from the ui package for backward compatibility. New code should import internal/ui directly.

View Source
var GlobalKeys = GlobalKeyMap{
	Quit: key.NewBinding(
		key.WithKeys("q", "ctrl+c"),
		key.WithHelp("q", "quit"),
	),
	Help: key.NewBinding(
		key.WithKeys("?"),
		key.WithHelp("?", "help"),
	),
	Back: key.NewBinding(
		key.WithKeys("esc"),
		key.WithHelp("esc", "back"),
	),
	Search: key.NewBinding(
		key.WithKeys("/"),
		key.WithHelp("/", "filter"),
	),
	Tab: key.NewBinding(
		key.WithKeys("tab"),
		key.WithHelp("tab", "next view"),
	),
}

GlobalKeys is the default set of global keybindings.

Functions

func ApplyGlobalBindings

func ApplyGlobalBindings(b config.GlobalBindings)

ApplyGlobalBindings applies user keybinding overrides to the global keys.

Types

type ClusterDataMsg

type ClusterDataMsg struct {
	Nodes    []ray.Node
	Jobs     []ray.JobDetail
	Actors   []ray.Actor
	Serve    *ray.ServeInstanceDetails
	Events   []ray.ClusterEvent
	FetchErr error
	Latency  time.Duration
}

ClusterDataMsg carries fetched cluster data as a Bubble Tea message.

type CombinedKeyMap

type CombinedKeyMap struct {
	Global help.KeyMap
	View   help.KeyMap
}

CombinedKeyMap merges two help.KeyMaps so the help overlay shows both global and view-specific keybindings.

func (CombinedKeyMap) FullHelp

func (c CombinedKeyMap) FullHelp() [][]key.Binding

FullHelp returns the combined full help groups (view-specific groups first, then global).

func (CombinedKeyMap) ShortHelp

func (c CombinedKeyMap) ShortHelp() []key.Binding

ShortHelp returns the combined short help bindings (view-specific first, then global).

type ErrMsg

type ErrMsg struct {
	Err error
}

ErrMsg is sent when an async operation encounters an error.

type GlobalKeyMap

type GlobalKeyMap struct {
	Quit   key.Binding
	Help   key.Binding
	Back   key.Binding
	Search key.Binding
	Tab    key.Binding
}

GlobalKeyMap defines keybindings handled at the root model level.

func (GlobalKeyMap) FullHelp

func (k GlobalKeyMap) FullHelp() [][]key.Binding

FullHelp returns keybindings grouped for the full help view.

func (GlobalKeyMap) ShortHelp

func (k GlobalKeyMap) ShortHelp() []key.Binding

ShortHelp returns keybindings for the short help view.

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model is the root Bubble Tea model for rayatouille.

func New

func New(client ray.Client, cfg *config.Config, version *ray.VersionInfo) Model

New creates a new root Model with the given client, config, and version info.

func (Model) Init

func (m Model) Init() tea.Cmd

Init returns the initial command for the model.

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update handles messages and returns the updated model and any commands.

func (Model) View

func (m Model) View() tea.View

View renders the current state of the model.

type NavStack struct {
	// contains filtered or unexported fields
}

NavStack manages a stack of views for navigation.

func NewNavStack

func NewNavStack() NavStack

NewNavStack returns a NavStack initialized with ViewDashboard as root.

func (n *NavStack) Breadcrumbs() string

Breadcrumbs returns view names joined with " > ".

func (n *NavStack) Current() View

Current returns the top view on the stack.

func (n *NavStack) Depth() int

Depth returns the number of views on the stack.

func (n *NavStack) Pop() View

Pop removes and returns the top view. Never pops the root view.

func (n *NavStack) Push(v View)

Push adds a view to the top of the stack.

type ProfileSwitchedMsg

type ProfileSwitchedMsg struct {
	Name    string
	Client  ray.Client
	Version *ray.VersionInfo
	Err     error
}

ProfileSwitchedMsg carries the result of a profile switch attempt.

type SwitchProfileMsg

type SwitchProfileMsg struct {
	Name string
}

SwitchProfileMsg requests a runtime switch to a named profile.

type TickMsg

type TickMsg time.Time

TickMsg is sent on each periodic polling tick.

type UITickMsg

type UITickMsg time.Time

UITickMsg is sent every second to force UI re-renders (e.g., status bar timer).

type View

type View int

View represents which view is currently active.

const (
	// ViewDashboard is the cluster overview dashboard.
	ViewDashboard View = iota
	// ViewJobs is the jobs list view.
	ViewJobs
	// ViewJobDetail is the job detail view.
	ViewJobDetail
	// ViewNodes is the nodes list view.
	ViewNodes
	// ViewNodeDetail is the node detail view.
	ViewNodeDetail
	// ViewActors is the actors list view.
	ViewActors
	// ViewActorDetail is the actor detail view.
	ViewActorDetail
	// ViewServe is the serve applications list view.
	ViewServe
	// ViewServeDetail is the serve application detail view.
	ViewServeDetail
	// ViewEvents is the cluster events timeline view.
	ViewEvents
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL