models

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CPUStats

type CPUStats struct {
	Usage struct {
		Total  uint   `json:"total_usage"`
		PerCPU []uint `json:"percpu_usage"`
	} `json:"cpu_usage"`
	SystemCPUUsage uint `json:"system_cpu_usage"`
	OnlineCPUs     int  `json:"online_cpus"`
}

type Container

type Container struct {
	ID     string
	Name   string
	Image  string
	Status string
	State  ContainerState
}

func (Container) String

func (c Container) String() string

type ContainerRemoveForm

type ContainerRemoveForm struct {
	Force         bool
	RemoveVolumes bool
}

type ContainerState

type ContainerState string
const (
	ContainerStateCreated    ContainerState = "created"
	ContainerStateRunning    ContainerState = "running"
	ContainerStatePaused     ContainerState = "paused"
	ContainerStateRestarting ContainerState = "restarting"
	ContainerStateRemoving   ContainerState = "removing"
	ContainerStateExited     ContainerState = "exited"
	ContainerStateDead       ContainerState = "dead"
)

type Image

type Image struct {
	ID        string
	Size      int64
	Tags      []string
	Status    ImageStatus
	CreatedAt string
}

type ImageRemoveForm

type ImageRemoveForm struct {
	Force         bool
	PruneChildren bool
}

type ImageStatus

type ImageStatus string
const (
	ImageStatusInUse          ImageStatus = "In use"
	ImageStatusUnUsed         ImageStatus = "Un used"
	ImageStatusUnUsedDangling ImageStatus = "Un used (dangling)"
)

type MemoryStats

type MemoryStats struct {
	Usage    int64 `json:"usage"`
	MaxUsage int64 `json:"max_usage"`
	Limit    int64
	Stats    struct {
		Cache int64
	} `json:"stats"`
}

type Node

type Node struct {
	Value string
	Next  *Node
}

type Question

type Question int
const (
	QNewContainerName Question = iota + 1
)
const (
	QNewImageName Question = iota + 1
)

func (Question) NextQuestion

func (q Question) NextQuestion() Question

type Queue

type Queue struct {
	Length int
	// contains filtered or unexported fields
}

func NewQueue

func NewQueue() *Queue

Add to the end, remove from the beginning

func (*Queue) Pop

func (q *Queue) Pop() *Node

func (*Queue) Push

func (q *Queue) Push(value string) *Queue

func (*Queue) String

func (q *Queue) String() string

type Scene

type Scene int
const (
	SceneRenameContainer Scene = iota + 1
	SceneRenameImage
)

type Stats

type Stats struct {
	Read      time.Time
	Preread   time.Time
	PIDsStats map[string]int `json:"pids_stats"`
	CPU       CPUStats       `json:"cpu_stats"`
	PerCPU    CPUStats       `json:"percpu_stats"`
	Memory    MemoryStats    `json:"memory_stats"`
}

type UserData

type UserData struct {
	ContainerRemoveForm *ContainerRemoveForm
	ImageRemoveForm     *ImageRemoveForm
}

Jump to

Keyboard shortcuts

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