ui

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2015 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultCost = &Cost{
	Del:  10,
	Ins:  1,
	Subs: 10}

Functions

func Levenshtein

func Levenshtein(needle string, hays string, cost *Cost) int

Types

type Box

type Box struct {
	// contains filtered or unexported fields
}

func NewBox

func NewBox(m *model.Model, svr *server.Server, client *client.Docker, store *Store) *Box

func (*Box) Draw

func (b *Box) Draw()

func (*Box) Init

func (b *Box) Init() error

func (*Box) PrintLn

func (b *Box) PrintLn(str string)

func (*Box) Printf added in v0.4.2

func (b *Box) Printf(format string, a ...interface{})

func (*Box) Run

func (b *Box) Run() error

func (*Box) Select

func (b *Box) Select()

type ByDistance

type ByDistance []*Entry

func (ByDistance) Len

func (s ByDistance) Len() int

func (ByDistance) Less

func (s ByDistance) Less(i, j int) bool

func (ByDistance) Swap

func (s ByDistance) Swap(i, j int)

type Cost

type Cost struct {
	Del, Ins, Subs int
}

type Entry

type Entry struct {
	Distance  int
	Isolation *model.Isolation
}

type State added in v0.4.2

type State struct {
	DockerHostAddress      string // docker host address
	DockerHostStatus       string // docker host status
	CurrentIsolationStatus string // current isolation
	CurrentIsolationName   string //name of the current isolation

	Deps       []*model.Dep
	Isolations []*model.Isolation
	DockerInfo *dockerclient.Info
	Errors     []error
}

func NewState added in v0.4.2

func NewState() *State

type Store added in v0.4.2

type Store struct {
	State *State
	Syncs chan struct{}
	// contains filtered or unexported fields
}

func NewStore added in v0.4.2

func NewStore(m *model.Model, c *client.Docker) (*Store, error)

func (*Store) SwitchTo added in v0.4.2

func (s *Store) SwitchTo(iso *model.Isolation)

func (*Store) Sync added in v0.4.2

func (s *Store) Sync()

Jump to

Keyboard shortcuts

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