swarm

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeRow

type NodeRow struct {
	Name          *drytermui.ParColumn
	Role          *drytermui.ParColumn
	Labels        *drytermui.ParColumn
	CPU           *drytermui.ParColumn
	Memory        *drytermui.ParColumn
	Engine        *drytermui.ParColumn
	IPAddress     *drytermui.ParColumn
	Status        *drytermui.ParColumn
	ManagerStatus *drytermui.ParColumn
	Availability  *drytermui.ParColumn

	drytermui.Row
	// contains filtered or unexported fields
}

NodeRow is a Grid row showing runtime information about a node

func NewNodeRow

func NewNodeRow(node swarm.Node, table drytermui.Table) *NodeRow

NewNodeRow creats a new NodeRow widget

func (*NodeRow) Buffer

func (row *NodeRow) Buffer() termui.Buffer

Buffer returns this Row data as a termui.Buffer

func (*NodeRow) ColumnsForFilter

func (row *NodeRow) ColumnsForFilter() []*drytermui.ParColumn

ColumnsForFilter returns the columns that are used to filter

func (*NodeRow) Highlighted

func (row *NodeRow) Highlighted()

Highlighted marks this rows as being highlighted

func (*NodeRow) NotHighlighted

func (row *NodeRow) NotHighlighted()

NotHighlighted marks this rows as being not highlighted

type NodeTasksWidget

type NodeTasksWidget struct {
	TasksWidget
	// contains filtered or unexported fields
}

NodeTasksWidget shows a node's task information

func NewNodeTasksWidget

func NewNodeTasksWidget(swarmClient docker.SwarmAPI, s appui.Screen) *NodeTasksWidget

NewNodeTasksWidget creates a TasksWidget

func (*NodeTasksWidget) Buffer

func (s *NodeTasksWidget) Buffer() gizaktermui.Buffer

Buffer returns the content of this widget as a termui.Buffer

func (*NodeTasksWidget) ForNode

func (s *NodeTasksWidget) ForNode(nodeID string)

ForNode sets the node for which this widget will render tasks

func (*NodeTasksWidget) Mount

func (s *NodeTasksWidget) Mount() error

Mount prepares this widget for rendering

func (*NodeTasksWidget) Name

func (s *NodeTasksWidget) Name() string

Name returns this widget name

type NodesWidget

type NodesWidget struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

NodesWidget presents Docker swarm information

func NewNodesWidget

func NewNodesWidget(swarmClient docker.SwarmAPI, s appui.Screen) *NodesWidget

NewNodesWidget creates a NodesWidget

func (*NodesWidget) Buffer

func (s *NodesWidget) Buffer() gizaktermui.Buffer

Buffer returns the content of this widget as a termui.Buffer

func (*NodesWidget) Filter

func (s *NodesWidget) Filter(filter string)

Filter applies the given filter to the container list

func (*NodesWidget) Mount

func (s *NodesWidget) Mount() error

Mount prepares this widget for rendering

func (*NodesWidget) Name

func (s *NodesWidget) Name() string

Name returns this widget name

func (*NodesWidget) OnEvent

func (s *NodesWidget) OnEvent(event appui.EventCommand) error

OnEvent runs the given command

func (*NodesWidget) RowCount

func (s *NodesWidget) RowCount() int

RowCount returns the number of rows of this widget.

func (*NodesWidget) Sort

func (s *NodesWidget) Sort()

Sort rotates to the next sort mode.

func (*NodesWidget) Unmount

func (s *NodesWidget) Unmount() error

Unmount tells this widge that in will not be rendered anymore

type ServiceInfoWidget

type ServiceInfoWidget struct {
	drytermui.SizableBufferer
	// contains filtered or unexported fields
}

ServiceInfoWidget shows service information

func NewServiceInfoWidget

func NewServiceInfoWidget(swarmClient docker.SwarmAPI, service *swarm.Service, screen appui.Screen) *ServiceInfoWidget

NewServiceInfoWidget creates ServiceInfoWidget with information about the service with the given ID

type ServiceListInfo

type ServiceListInfo struct {
	Mode     string
	Replicas string
}

ServiceListInfo stores the information about mode and replicas to be used by template

type ServiceRow

type ServiceRow struct {
	ID           *drytermui.ParColumn
	Name         *drytermui.ParColumn
	Mode         *drytermui.ParColumn
	Replicas     *drytermui.ParColumn
	Image        *drytermui.ParColumn
	ServicePorts *drytermui.ParColumn

	appui.Row
	// contains filtered or unexported fields
}

ServiceRow is a Grid row showing service information

func NewServiceRow

func NewServiceRow(service swarm.Service, serviceInfo ServiceListInfo, table drytermui.Table) *ServiceRow

NewServiceRow creats a new ServiceRow widget

func (*ServiceRow) ColumnsForFilter

func (row *ServiceRow) ColumnsForFilter() []*drytermui.ParColumn

ColumnsForFilter returns the columns that are used to filter

type ServiceTasksWidget

type ServiceTasksWidget struct {
	TasksWidget
	// contains filtered or unexported fields
}

ServiceTasksWidget shows a service's task information

func NewServiceTasksWidget

func NewServiceTasksWidget(swarmClient docker.SwarmAPI, s appui.Screen) *ServiceTasksWidget

NewServiceTasksWidget creates a TasksWidget

func (*ServiceTasksWidget) Buffer

Buffer returns the content of this widget as a termui.Buffer

func (*ServiceTasksWidget) ForService

func (s *ServiceTasksWidget) ForService(serviceID string)

ForService sets the service for which this widget is showing tasks

func (*ServiceTasksWidget) Mount

func (s *ServiceTasksWidget) Mount() error

Mount prepares this widget for rendering

func (*ServiceTasksWidget) Name

func (s *ServiceTasksWidget) Name() string

Name returns this widget name

type ServicesWidget

type ServicesWidget struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

ServicesWidget shows information about services running on the Swarm

func NewServicesWidget

func NewServicesWidget(swarmClient docker.SwarmAPI, s appui.Screen) *ServicesWidget

NewServicesWidget creates a ServicesWidget

func (*ServicesWidget) Buffer

func (s *ServicesWidget) Buffer() gizaktermui.Buffer

Buffer returns the content of this widget as a termui.Buffer

func (*ServicesWidget) Filter

func (s *ServicesWidget) Filter(filter string)

Filter applies the given filter to the container list

func (*ServicesWidget) Mount

func (s *ServicesWidget) Mount() error

Mount prepares this widget for rendering

func (*ServicesWidget) Name

func (s *ServicesWidget) Name() string

Name returns this widget name

func (*ServicesWidget) OnEvent

func (s *ServicesWidget) OnEvent(event appui.EventCommand) error

OnEvent runs the given command

func (*ServicesWidget) RowCount

func (s *ServicesWidget) RowCount() int

RowCount returns the number of rowns of this widget.

func (*ServicesWidget) Sort

func (s *ServicesWidget) Sort()

Sort rotates to the next sort mode. SortByServiceName -> SortByServiceImage -> SortByServiceName

func (*ServicesWidget) Unmount

func (s *ServicesWidget) Unmount() error

Unmount marks this widget as unmounted

type StackRow

type StackRow struct {
	Name         *drytermui.ParColumn
	Services     *drytermui.ParColumn
	Orchestrator *drytermui.ParColumn
	Networks     *drytermui.ParColumn
	Configs      *drytermui.ParColumn
	Secrets      *drytermui.ParColumn

	appui.Row
	// contains filtered or unexported fields
}

StackRow is a Grid row showing stack information

func NewStackRow

func NewStackRow(stack docker.Stack, table drytermui.Table) *StackRow

NewStackRow creats a new StackRow widget

func (*StackRow) ColumnsForFilter

func (row *StackRow) ColumnsForFilter() []*drytermui.ParColumn

ColumnsForFilter returns the columns that are used to filter

type StacksTasksWidget

type StacksTasksWidget struct {
	TasksWidget
	// contains filtered or unexported fields
}

StacksTasksWidget shows a service's task information

func NewStacksTasksWidget

func NewStacksTasksWidget(swarmClient docker.SwarmAPI, s appui.Screen) *StacksTasksWidget

NewStacksTasksWidget creates a StacksTasksWidget

func (*StacksTasksWidget) Buffer

func (s *StacksTasksWidget) Buffer() gizaktermui.Buffer

Buffer returns the content of this widget as a termui.Buffer

func (*StacksTasksWidget) ForStack

func (s *StacksTasksWidget) ForStack(stack string)

ForStack sets the stack for which this widget is showing tasks

func (*StacksTasksWidget) Mount

func (s *StacksTasksWidget) Mount() error

Mount prepares this widget for rendering

func (*StacksTasksWidget) Name

func (s *StacksTasksWidget) Name() string

Name returns this widget name

type StacksWidget

type StacksWidget struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

StacksWidget shows information about services running on the Swarm

func NewStacksWidget

func NewStacksWidget(swarmClient docker.SwarmAPI, s appui.Screen) *StacksWidget

NewStacksWidget creates a StacksWidget

func (*StacksWidget) Buffer

func (s *StacksWidget) Buffer() gizaktermui.Buffer

Buffer returns the content of this widget as a termui.Buffer

func (*StacksWidget) Filter

func (s *StacksWidget) Filter(filter string)

Filter applies the given filter to the container list

func (*StacksWidget) Mount

func (s *StacksWidget) Mount() error

Mount prepares this widget for rendering

func (*StacksWidget) Name

func (s *StacksWidget) Name() string

Name returns this widget name

func (*StacksWidget) OnEvent

func (s *StacksWidget) OnEvent(event appui.EventCommand) error

OnEvent runs the given command

func (*StacksWidget) RowCount

func (s *StacksWidget) RowCount() int

RowCount returns the number of rowns of this widget.

func (*StacksWidget) Sort

func (s *StacksWidget) Sort()

Sort rotates to the next sort mode. SortByServiceName -> SortByServiceImage -> SortByServiceName

func (*StacksWidget) Unmount

func (s *StacksWidget) Unmount() error

Unmount marks this widget as unmounted

type TaskRow

type TaskRow struct {
	ID           *drytermui.ParColumn
	Name         *drytermui.ParColumn
	Image        *drytermui.ParColumn
	Node         *drytermui.ParColumn
	DesiredState *drytermui.ParColumn
	CurrentState *drytermui.ParColumn
	Error        *drytermui.ParColumn
	Ports        *drytermui.ParColumn

	drytermui.Row
	// contains filtered or unexported fields
}

TaskRow is a Grid row showing runtime information about a task

func NewTaskRow

func NewTaskRow(swarmClient docker.SwarmAPI, task swarm.Task, table drytermui.Table) *TaskRow

NewTaskRow creats a new TaskRow widget

func (*TaskRow) Buffer

func (row *TaskRow) Buffer() termui.Buffer

Buffer returns this Row data as a termui.Buffer

func (*TaskRow) ColumnsForFilter

func (row *TaskRow) ColumnsForFilter() []*drytermui.ParColumn

ColumnsForFilter returns the columns that are used to filter

func (*TaskRow) Highlighted

func (row *TaskRow) Highlighted()

Highlighted marks this rows as being highlighted

func (*TaskRow) NotHighlighted

func (row *TaskRow) NotHighlighted()

NotHighlighted marks this rows as being not highlighted

type TasksWidget

type TasksWidget struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

TasksWidget shows a service's task information

func (*TasksWidget) Filter

func (s *TasksWidget) Filter(filter string)

Filter applies the given filter to the container list

func (*TasksWidget) OnEvent

func (s *TasksWidget) OnEvent(event appui.EventCommand) error

OnEvent runs the given command

func (*TasksWidget) RowCount

func (s *TasksWidget) RowCount() int

RowCount returns the number of rowns of this widget.

func (*TasksWidget) Sort

func (s *TasksWidget) Sort()

Sort rotates to the next sort mode. SortByTaskService -> SortByTaskImage -> SortByTaskDesiredState -> SortByTaskState -> SortByTaskService

func (*TasksWidget) Unmount

func (s *TasksWidget) Unmount() error

Unmount marks this widget as unmounted

Jump to

Keyboard shortcuts

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