servicesview

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const PollInterval = 2 * time.Second
View Source
const ViewName = "services"

Variables

This section is empty.

Functions

func GetServicesHelpContent

func GetServicesHelpContent() []helpview.HelpCategory

GetServicesHelpContent returns categorized help for the services view

Types

type AllTasksLoadedMsg

type AllTasksLoadedMsg struct {
	Tasks map[string][]docker.TaskEntry
}

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 New

func New(width, height int) *Model

func (*Model) ApplySearchQuery

func (m *Model) ApplySearchQuery(query string)

ApplySearchQuery sets the filter query and applies it.

func (*Model) CapturesInput

func (m *Model) CapturesInput() bool

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 (m *Model) FrameContent() string

func (*Model) FrameFooter

func (m *Model) FrameFooter() string

func (*Model) FrameHeader

func (m *Model) FrameHeader() string

func (*Model) FrameTitle

func (m *Model) FrameTitle() string

func (*Model) HasActiveFilter

func (m *Model) HasActiveFilter() bool

HasActiveFilter reports whether a filter query is active.

func (*Model) HasErrors

func (m *Model) HasErrors() bool

HasErrors returns true if any service in the current filtered list has errors

func (*Model) Init

func (m *Model) Init() tea.Cmd

func (*Model) IsSearching

func (m *Model) IsSearching() bool

IsSearching reports whether the list is currently in search mode.

func (*Model) Name

func (m *Model) Name() string

func (*Model) OnEnter

func (m *Model) OnEnter() tea.Cmd

func (*Model) OnExit

func (m *Model) OnExit() tea.Cmd

func (*Model) SetContent

func (m *Model) SetContent(msg Msg)

func (*Model) SetPendingSelectServiceName

func (m *Model) SetPendingSelectServiceName(serviceName string)

func (*Model) ShortHelpItems

func (m *Model) ShortHelpItems() []helpbar.HelpEntry

func (*Model) Update

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

func (*Model) View

func (m *Model) View() string

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

type RemoveErrorMsg struct {
	ServiceName string
	Error       error
}

RemoveErrorMsg is sent when a service remove operation fails

type RestartErrorMsg

type RestartErrorMsg struct {
	ServiceName string
	Error       error
}

RestartErrorMsg is sent when a service restart fails

type RollbackErrorMsg

type RollbackErrorMsg struct {
	ServiceName string
	Error       error
}

RollbackErrorMsg is sent when a service rollback operation fails

type ScaleErrorMsg

type ScaleErrorMsg struct {
	ServiceName string
	Error       error
}

ScaleErrorMsg is sent when a service scale operation fails

type SortField

type SortField int
const (
	SortByName SortField = iota
	SortByStatus
	SortByImage
	SortByPorts
	SortByCreated
	SortByUpdated
	SortByError
)

type TasksLoadedMsg

type TasksLoadedMsg struct {
	ServiceID string
	Tasks     []docker.TaskEntry
}

TasksLoadedMsg is sent when tasks for a service are loaded

type TickMsg

type TickMsg time.Time

Jump to

Keyboard shortcuts

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