Documentation
¶
Index ¶
- Constants
- Variables
- func GetServicesHelpContent() []helpview.HelpCategory
- type AllTasksLoadedMsg
- type FilterType
- type Model
- func (m *Model) ApplySearchQuery(query string)
- func (m *Model) CapturesInput() bool
- func (m *Model) ClearSearchQuery()
- func (m *Model) FrameContent() string
- func (m *Model) FrameFooter() string
- func (m *Model) FrameHeader() string
- func (m *Model) FrameTitle() string
- func (m *Model) HasActiveFilter() bool
- func (m *Model) HasErrors() bool
- func (m *Model) HelpContent() []helpview.HelpCategory
- func (m *Model) Init() tea.Cmd
- func (m *Model) IsSearching() bool
- func (m *Model) Name() string
- func (m *Model) OnEnter() tea.Cmd
- func (m *Model) OnExit() tea.Cmd
- func (m *Model) SetContent(msg Msg)
- func (m *Model) SetPendingSelectServiceName(serviceName string)
- func (m *Model) ShortHelpItems() []helpbar.HelpEntry
- func (m *Model) Update(msg tea.Msg) tea.Cmd
- func (m *Model) View() string
- type Msg
- type PollRetryMsg
- type RemoveErrorMsg
- type RestartErrorMsg
- type RollbackErrorMsg
- type ScaleErrorMsg
- type SortField
- type TasksLoadedMsg
- type TickMsg
Constants ¶
const ViewName = "services"
Variables ¶
var PollInterval = 2 * time.Second
PollInterval is how often the view re-reads its resource. It is a var, not a const, so tests can shrink it: a tea.Tick cmd invoked synchronously blocks for the full interval, so a test that runs one to see what it scheduled would otherwise sit here for the whole period.
Functions ¶
func GetServicesHelpContent ¶
func GetServicesHelpContent() []helpview.HelpCategory
GetServicesHelpContent returns categorized help for the services view
Types ¶
type AllTasksLoadedMsg ¶
AllTasksLoadedMsg carries refreshed tasks for all expanded services at once.
type FilterType ¶
type FilterType int
const ( NodeFilter FilterType = iota StackFilter NoStackFilter AllFilter )
type Model ¶
type Model struct {
List filterlist.FilterableList[docker.ServiceEntry]
Visible bool
// contains filtered or unexported fields
}
func (*Model) ApplySearchQuery ¶
ApplySearchQuery sets the filter query and applies it.
func (*Model) CapturesInput ¶
CapturesInput reports whether the view is currently capturing all keyboard input.
func (*Model) ClearSearchQuery ¶
func (m *Model) ClearSearchQuery()
ClearSearchQuery clears the filter query and resets the view.
func (*Model) FrameContent ¶
func (*Model) FrameFooter ¶
func (*Model) FrameHeader ¶
func (*Model) FrameTitle ¶
func (*Model) HasActiveFilter ¶
HasActiveFilter reports whether a filter query is active.
func (*Model) HasErrors ¶
HasErrors returns true if any service in the current filtered list has errors
func (*Model) HelpContent ¶ added in v1.14.0
func (m *Model) HelpContent() []helpview.HelpCategory
HelpContent implements the app's optional help-screen contract: "?" is handled centrally, and a view carrying its own screen supplies it here.
func (*Model) IsSearching ¶
IsSearching reports whether the list is currently in search mode.
func (*Model) SetContent ¶
func (*Model) SetPendingSelectServiceName ¶
func (*Model) ShortHelpItems ¶
type Msg ¶
type Msg struct {
Scope string
Entries []docker.ServiceEntry
FilterType FilterType
NodeID string
Hostname string
StackName string
}
type PollRetryMsg ¶
type PollRetryMsg struct{}
PollRetryMsg signals that polling found no changes; the Update handler should schedule the next tick.
type RemoveErrorMsg ¶
RemoveErrorMsg is sent when a service remove operation fails
type RestartErrorMsg ¶
RestartErrorMsg is sent when a service restart fails
type RollbackErrorMsg ¶
RollbackErrorMsg is sent when a service rollback operation fails
type ScaleErrorMsg ¶
ScaleErrorMsg is sent when a service scale operation fails
type TasksLoadedMsg ¶
TasksLoadedMsg is sent when tasks for a service are loaded