Documentation
¶
Index ¶
- func FetchInstanceStateCmd(model InspectModel) tea.Cmd
- func ToSplitPaneItems(items []deployui.DeployItem) []splitpane.Item
- type BackToListMsg
- type InspectAppConfig
- type InspectDetailsRenderer
- type InspectErrorMsg
- type InspectEventMsg
- type InspectFooterRenderer
- type InspectModel
- func (m *InspectModel) CurrentStatus() core.InstanceStatus
- func (m *InspectModel) Err() error
- func (m *InspectModel) GetError() error
- func (m InspectModel) Init() tea.Cmd
- func (m *InspectModel) InstanceState() *state.InstanceState
- func (m *InspectModel) IsFinished() bool
- func (m *InspectModel) IsInSubView() bool
- func (m *InspectModel) RefreshInstanceState(instanceState *state.InstanceState)
- func (m *InspectModel) SetEmbeddedInList(embedded bool)
- func (m *InspectModel) SetInstanceState(instanceState *state.InstanceState)
- func (m InspectModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m InspectModel) View() string
- type InspectModelConfig
- type InspectSectionGrouper
- type InspectStreamClosedMsg
- type InspectStreamStartedMsg
- type InstanceInputFormModel
- type InstanceInputMsg
- type InstanceNotFoundMsg
- type InstanceStateFetchedMsg
- type InstanceStateRefreshedMsg
- type MainModel
- type StateRefreshTickMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchInstanceStateCmd ¶
func FetchInstanceStateCmd(model InspectModel) tea.Cmd
FetchInstanceStateCmd fetches the instance state from the engine (exported for embedding).
func ToSplitPaneItems ¶
func ToSplitPaneItems(items []deployui.DeployItem) []splitpane.Item
ToSplitPaneItems converts a slice of DeployItems to splitpane.Items.
Types ¶
type BackToListMsg ¶
type BackToListMsg struct{}
BackToListMsg is sent when the user wants to navigate back to the list view.
type InspectAppConfig ¶
type InspectAppConfig struct {
DeployEngine engine.DeployEngine
Logger *zap.Logger
InstanceID string
InstanceName string
Styles *stylespkg.Styles
Headless bool
HeadlessWriter io.Writer
JSONMode bool
}
InspectAppConfig holds configuration for creating a new inspect application.
type InspectDetailsRenderer ¶
type InspectDetailsRenderer struct {
MaxExpandDepth int
InstanceState *state.InstanceState
Finished bool
}
InspectDetailsRenderer implements splitpane.DetailsRenderer for inspect UI.
func (*InspectDetailsRenderer) RenderDetails ¶
func (r *InspectDetailsRenderer) RenderDetails(item splitpane.Item, width int, s *styles.Styles) string
RenderDetails renders the right pane content for a selected item.
type InspectErrorMsg ¶
type InspectErrorMsg struct {
Err error
}
InspectErrorMsg is sent when an error occurs.
type InspectEventMsg ¶
type InspectEventMsg types.BlueprintInstanceEvent
InspectEventMsg wraps a deployment event for the inspect flow.
func (InspectEventMsg) AsFinish ¶
func (m InspectEventMsg) AsFinish() (*container.DeploymentFinishedMessage, bool)
AsFinish returns the finish data if this is a finish event.
type InspectFooterRenderer ¶
type InspectFooterRenderer struct {
}
InspectFooterRenderer implements splitpane.FooterRenderer for inspect UI.
func (*InspectFooterRenderer) RenderFooter ¶
RenderFooter renders the inspect-specific footer.
type InspectModel ¶
type InspectModel struct {
// contains filtered or unexported fields
}
InspectModel is the model for the inspect view.
func NewInspectModel ¶
func NewInspectModel(cfg InspectModelConfig) *InspectModel
NewInspectModel creates a new inspect model.
func (*InspectModel) CurrentStatus ¶
func (m *InspectModel) CurrentStatus() core.InstanceStatus
CurrentStatus returns the current status from the footer renderer.
func (*InspectModel) Err ¶
func (m *InspectModel) Err() error
Err returns the current error from the inspect model.
func (*InspectModel) GetError ¶
func (m *InspectModel) GetError() error
GetError returns the current error from the inspect model. Deprecated: Use Err() for consistency with other models.
func (*InspectModel) InstanceState ¶
func (m *InspectModel) InstanceState() *state.InstanceState
InstanceState returns the current instance state.
func (*InspectModel) IsFinished ¶
func (m *InspectModel) IsFinished() bool
IsFinished returns whether the inspect operation has finished.
func (*InspectModel) IsInSubView ¶
func (m *InspectModel) IsInSubView() bool
IsInSubView returns true if the inspect model is showing a sub-view (overview, spec, exports, or drill-down) where esc should close the sub-view rather than navigate back to the list.
func (*InspectModel) RefreshInstanceState ¶
func (m *InspectModel) RefreshInstanceState(instanceState *state.InstanceState)
RefreshInstanceState updates the instance state and hydrates existing items with the latest ResourceState data. This preserves the current item list and selection while updating output/spec data for completed resources.
func (*InspectModel) SetEmbeddedInList ¶
func (m *InspectModel) SetEmbeddedInList(embedded bool)
SetEmbeddedInList marks the inspect model as embedded within the list UI. This changes the footer to show "esc back to list" instead of just "q quit".
func (*InspectModel) SetInstanceState ¶
func (m *InspectModel) SetInstanceState(instanceState *state.InstanceState)
SetInstanceState sets the instance state and rebuilds items from it.
type InspectModelConfig ¶
type InspectModelConfig struct {
DeployEngine engine.DeployEngine
Logger *zap.Logger
InstanceID string
InstanceName string
Styles *stylespkg.Styles
IsHeadless bool
HeadlessWriter io.Writer
JSONMode bool
}
InspectModelConfig holds configuration for creating a new inspect model.
type InspectSectionGrouper ¶
type InspectSectionGrouper struct {
shared.SectionGrouper
}
InspectSectionGrouper implements splitpane.SectionGrouper for inspect UI.
type InspectStreamClosedMsg ¶
type InspectStreamClosedMsg struct{}
InspectStreamClosedMsg is sent when the event stream is closed.
type InspectStreamStartedMsg ¶
type InspectStreamStartedMsg struct{}
InspectStreamStartedMsg is sent when the event stream has been started.
type InstanceInputFormModel ¶
type InstanceInputFormModel struct {
// contains filtered or unexported fields
}
InstanceInputFormModel provides a form for entering instance name/ID.
func NewInstanceInputFormModel ¶
func NewInstanceInputFormModel(styles *stylespkg.Styles) *InstanceInputFormModel
NewInstanceInputFormModel creates a new instance input form.
func (*InstanceInputFormModel) Init ¶
func (m *InstanceInputFormModel) Init() tea.Cmd
Init initializes the form.
func (*InstanceInputFormModel) View ¶
func (m *InstanceInputFormModel) View() string
View renders the form.
type InstanceInputMsg ¶
InstanceInputMsg is sent when the user enters an instance identifier.
type InstanceNotFoundMsg ¶
type InstanceNotFoundMsg struct {
Err error
}
InstanceNotFoundMsg is sent when the instance is not found.
type InstanceStateFetchedMsg ¶
type InstanceStateFetchedMsg struct {
InstanceState *state.InstanceState
IsInProgress bool
}
InstanceStateFetchedMsg is sent when the instance state has been fetched.
type InstanceStateRefreshedMsg ¶
type InstanceStateRefreshedMsg struct {
InstanceState *state.InstanceState
}
InstanceStateRefreshedMsg is sent when the instance state has been refreshed during streaming.
type MainModel ¶
type MainModel struct {
Error error
// contains filtered or unexported fields
}
MainModel is the top-level model for the inspect command TUI.
func NewInspectApp ¶
func NewInspectApp(cfg InspectAppConfig) (*MainModel, error)
NewInspectApp creates a new inspect application with the given configuration.
type StateRefreshTickMsg ¶
type StateRefreshTickMsg struct{}
StateRefreshTickMsg triggers a periodic state refresh during streaming.