Documentation ¶
Index ¶
- Constants
- Variables
- func PrettyColumn(in string, expected_len int, prefix string, suffix string) string
- type CommonLine
- type Container
- type ContainerLine
- type DockerCli
- func (cli *DockerCli) CheckTtyInput(attachStdin, ttyMode bool) error
- func (cli *DockerCli) Cmd(args ...string) error
- func (cli *DockerCli) CmdAttach(args ...string) error
- func (cli *DockerCli) CmdBuild(args ...string) error
- func (cli *DockerCli) CmdCommit(args ...string) error
- func (cli *DockerCli) CmdCp(args ...string) error
- func (cli *DockerCli) CmdCreate(args ...string) error
- func (cli *DockerCli) CmdDiff(args ...string) error
- func (cli *DockerCli) CmdEvents(args ...string) error
- func (cli *DockerCli) CmdExec(args ...string) error
- func (cli *DockerCli) CmdExport(args ...string) error
- func (cli *DockerCli) CmdHelp(args ...string) error
- func (cli *DockerCli) CmdHistory(args ...string) error
- func (cli *DockerCli) CmdImages(args ...string) error
- func (cli *DockerCli) CmdImport(args ...string) error
- func (cli *DockerCli) CmdInfo(args ...string) error
- func (cli *DockerCli) CmdInspect(args ...string) error
- func (cli *DockerCli) CmdKill(args ...string) error
- func (cli *DockerCli) CmdLoad(args ...string) error
- func (cli *DockerCli) CmdLogin(args ...string) error
- func (cli *DockerCli) CmdLogout(args ...string) error
- func (cli *DockerCli) CmdLogs(args ...string) error
- func (cli *DockerCli) CmdPause(args ...string) error
- func (cli *DockerCli) CmdPort(args ...string) error
- func (cli *DockerCli) CmdPot(args ...string) error
- func (cli *DockerCli) CmdPs(args ...string) error
- func (cli *DockerCli) CmdPull(args ...string) error
- func (cli *DockerCli) CmdPush(args ...string) error
- func (cli *DockerCli) CmdRestart(args ...string) error
- func (cli *DockerCli) CmdRm(args ...string) error
- func (cli *DockerCli) CmdRmi(args ...string) error
- func (cli *DockerCli) CmdRun(args ...string) error
- func (cli *DockerCli) CmdSave(args ...string) error
- func (cli *DockerCli) CmdSearch(args ...string) error
- func (cli *DockerCli) CmdStart(args ...string) error
- func (cli *DockerCli) CmdStop(args ...string) error
- func (cli *DockerCli) CmdTag(args ...string) error
- func (cli *DockerCli) CmdTop(args ...string) error
- func (cli *DockerCli) CmdUnpause(args ...string) error
- func (cli *DockerCli) CmdVersion(args ...string) error
- func (cli *DockerCli) CmdWait(args ...string) error
- func (cli *DockerCli) HTTPClient() *http.Client
- func (cli *DockerCli) LoadConfigFile() (err error)
- func (cli *DockerCli) Subcmd(name, signature, description string) *flag.FlagSet
- func (cli *DockerCli) WalkTree(noTrunc bool, images *engine.Table, byParent map[string]*engine.Table, ...)
- type ItemPair
- type Page
- type Pot
- func (pot *Pot) GetContainerByPos(line_num int) int
- func (pot *Pot) GetProcesses(cid string) []ProcessLine
- func (pot *Pot) KillContainer(c *Container)
- func (pot *Pot) PauseContainer(c *Container)
- func (pot *Pot) PrintActive(l PrintedLine, lc int, i int)
- func (pot *Pot) PrintHeader(wc int)
- func (pot *Pot) PrintHelp(wc int)
- func (pot *Pot) PrintInfo(wc int)
- func (pot *Pot) PrintPage(p Page, wc int)
- func (pot *Pot) PrintPot(wc int, lc int)
- func (pot *Pot) RmContainer(c *Container)
- func (pot *Pot) Run()
- func (pot *Pot) Snapshot() []Container
- func (pot *Pot) StartContainer(c *Container)
- func (pot *Pot) StopContainer(c *Container)
- func (pot *Pot) UnpauseContainer(c *Container)
- func (pot *Pot) UpdatePot(lc int, wc int)
- type PrintedLine
- type ProcessLine
- type Sort
- type SortableContainers
- type Status
Constants ¶
View Source
const ( NB_COLUMNS = 8 HEADER_SIZE = 2 )
View Source
const ( COLOR_CONTAINER = iota + 2 COLOR_SELECTION COLOR_HELP COLOR_RUNNING COLOR_HIGHLIGHT )
View Source
const ( STATUS_POT = iota // Currently displaying containers STATUS_HELP // Currently displaying help STATUS_CONFIRM // Currently waiting for confirmation STATUS_INFO // Currently displaying info )
View Source
const ( SORT_NAME = iota SORT_IMAGE SORT_ID SORT_COMMAND SORT_UPTIME SORT_STATUS SORT_CPU SORT_RAM )
Variables ¶
View Source
var (
ErrConnectionRefused = errors.New("Cannot connect to the Docker daemon. Is 'docker -d' running on this host?")
)
Functions ¶
Types ¶
type CommonLine ¶
type CommonLine struct { Id string // PID or docker hash Command string // command name or CMD Uptime string // container uptime or process uptime Status string // container status or process state CPU string // % of CPU used (if container, sum of % of processes) RAM string // RAM used (if container, sum of RAM of processes) }
CommonLine contains information common to each printed line
type ContainerLine ¶
type ContainerLine struct { Name string // docker container name Image string // docker container image CommonLine // same props as processes }
ContainerLine contains information specific to a docker container line
func (*ContainerLine) Format ¶
func (c *ContainerLine) Format(column_width int) string
type DockerCli ¶
type DockerCli struct {
// contains filtered or unexported fields
}
func NewDockerCli ¶
func NewDockerCli(in io.ReadCloser, out, err io.Writer, key libtrust.PrivateKey, proto, addr string, tlsConfig *tls.Config) *DockerCli
func (*DockerCli) CheckTtyInput ¶
func (*DockerCli) CmdHistory ¶
func (*DockerCli) CmdInspect ¶
func (*DockerCli) CmdRestart ¶
func (*DockerCli) CmdUnpause ¶
func (*DockerCli) CmdVersion ¶
'docker version': show version information
func (*DockerCli) HTTPClient ¶
func (*DockerCli) LoadConfigFile ¶
type Pot ¶
type Pot struct {
// contains filtered or unexported fields
}
func (*Pot) GetContainerByPos ¶
func (*Pot) GetProcesses ¶
func (pot *Pot) GetProcesses(cid string) []ProcessLine
Returns the running processes for the current Container
func (*Pot) KillContainer ¶
func (*Pot) PauseContainer ¶
func (*Pot) PrintActive ¶
func (pot *Pot) PrintActive(l PrintedLine, lc int, i int)
func (*Pot) PrintHeader ¶
func (*Pot) RmContainer ¶
func (*Pot) StartContainer ¶
func (*Pot) StopContainer ¶
func (*Pot) UnpauseContainer ¶
type PrintedLine ¶
type PrintedLine struct {
// contains filtered or unexported fields
}
type ProcessLine ¶
type ProcessLine ContainerLine
ProcessLine contains information about a process
func (*ProcessLine) Format ¶
func (c *ProcessLine) Format(column_width int) string
type SortableContainers ¶
type SortableContainers struct {
// contains filtered or unexported fields
}
func (SortableContainers) Len ¶
func (a SortableContainers) Len() int
func (SortableContainers) Less ¶
func (a SortableContainers) Less(i, j int) bool
func (SortableContainers) Swap ¶
func (a SortableContainers) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.