app

package
v0.3.0-beta Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2015 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Main viewMode = iota
	HelpMode
	StatsMode
	InspectMode
)

known view modes

View Source
const ShortHelp = `` /* 155-byte string literal not displayed */

Variables

This section is empty.

Functions

func Render

func Render(d *Dry, screen *ui.Screen)

Render knows how to render dry app in the given screen

func Write

func Write(d *Dry, w io.Writer)

Write sends dry output to the given writer

Types

type AppState

type AppState struct {
	Paused      bool
	ShowingHelp bool

	SortMode docker.SortMode
	// contains filtered or unexported fields
}

AppState is a naive attempt to represent application state

func (AppState) Render

func (appState AppState) Render() string

type Dry

type Dry struct {
	State *AppState
	// contains filtered or unexported fields
}

Dry represents the application.

func NewDryApp

func NewDryApp(screen *ui.Screen) (*Dry, error)

NewDryApp creates a new dry application

func NewDryAppWithDockerEnv

func NewDryAppWithDockerEnv(screen *ui.Screen, env *drydocker.DockerEnv) (*Dry, error)

NewDryAppWithDockerEnv creates a new dry application

func (*Dry) Changed

func (d *Dry) Changed() bool

Changed is true if the application state has changed

func (*Dry) Inspect

func (d *Dry) Inspect(position int)

Inspect set dry for inspecting container at the given position

func (*Dry) Kill

func (d *Dry) Kill(position int)

func (*Dry) Logs

func (d *Dry) Logs(position int) (io.ReadCloser, error)

func (*Dry) Ok

func (d *Dry) Ok() (bool, error)

func (*Dry) Refresh

func (d *Dry) Refresh()

func (*Dry) Rm

func (d *Dry) Rm(position int)

func (*Dry) ShowDockerHostInfo

func (d *Dry) ShowDockerHostInfo()

func (*Dry) ShowHelp

func (d *Dry) ShowHelp()

func (*Dry) Sort

func (d *Dry) Sort()

func (*Dry) StartContainer

func (d *Dry) StartContainer(position int)

func (*Dry) Stats

func (d *Dry) Stats(position int) (chan<- bool, error, <-chan error)

Stats get stats of container in the given position until a message is sent to the done channel

func (*Dry) StopContainer

func (d *Dry) StopContainer(position int)

func (*Dry) ToggleShowAllContainers

func (d *Dry) ToggleShowAllContainers()

type KeyPressEvent

type KeyPressEvent struct {
	Key    ui.Key
	Action func(dry Dry)
}

KeyPressEvent maps a key to an app action

Jump to

Keyboard shortcuts

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