hud

package
v0.13.6 Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const BuildDurCellMinWidth = 7
View Source
const BuildStatusCellMinWidth = 8
View Source
const DefaultRefreshInterval = 100 * time.Millisecond

The main loop ensures the HUD updates at least this often

View Source
const DeployCellMinWidth = 8

These widths are determined experimentally, to see what shows up in a typical UX.

View Source
const MaxInlineErrHeight = 6

Variables

Functions

func NewEditStatusLine added in v0.4.1

func NewEditStatusLine(buildStatus buildStatus) rty.Component

Types

type DisabledHud added in v0.10.23

type DisabledHud struct {
	ProcessedLogs logstore.Checkpoint
	// contains filtered or unexported fields
}

func (*DisabledHud) OnChange added in v0.10.23

func (h *DisabledHud) OnChange(ctx context.Context, st store.RStore)

func (*DisabledHud) Run added in v0.10.23

func (h *DisabledHud) Run(ctx context.Context, dispatch func(action store.Action), refreshRate time.Duration) error

func (*DisabledHud) TearDown added in v0.13.6

func (h *DisabledHud) TearDown(ctx context.Context)

TODO(nick): We should change this API so that TearDown gets the RStore one last time.

type DumpEngineStateAction added in v0.8.1

type DumpEngineStateAction struct {
}

func (DumpEngineStateAction) Action added in v0.8.1

func (DumpEngineStateAction) Action()

type EditStatusLineComponent added in v0.4.1

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

func (*EditStatusLineComponent) Render added in v0.4.1

func (esl *EditStatusLineComponent) Render(w rty.Writer, width, height int) error

func (*EditStatusLineComponent) Size added in v0.4.1

func (esl *EditStatusLineComponent) Size(availWidth, availHeight int) (int, int, error)

type ExitAction added in v0.1.0

type ExitAction struct {
	Err error
}

func NewExitAction added in v0.2.0

func NewExitAction(err error) ExitAction

func (ExitAction) Action added in v0.1.0

func (ExitAction) Action()

type FakeHud

type FakeHud struct {
	LastView view.View

	Canceled bool
	Closed   bool
	// contains filtered or unexported fields
}

func NewFakeHud

func NewFakeHud() *FakeHud

func (*FakeHud) OnChange

func (h *FakeHud) OnChange(ctx context.Context, st store.RStore)

func (*FakeHud) Run

func (h *FakeHud) Run(ctx context.Context, dispatch func(action store.Action), refreshInterval time.Duration) error

func (*FakeHud) WaitUntil added in v0.1.0

func (h *FakeHud) WaitUntil(t testing.TB, ctx context.Context, msg string, isDone func(view.View) bool)

func (*FakeHud) WaitUntilResource added in v0.7.12

func (h *FakeHud) WaitUntilResource(t testing.TB, ctx context.Context, msg string, name model.ManifestName, isDone func(view.Resource) bool)

type HeadsUpDisplay

type HeadsUpDisplay interface {
	store.Subscriber

	Run(ctx context.Context, dispatch func(action store.Action), refreshRate time.Duration) error
}

func NewDefaultHeadsUpDisplay

func NewDefaultHeadsUpDisplay(renderer *Renderer, webURL model.WebURL, analytics *analytics.TiltAnalytics) (HeadsUpDisplay, error)

func NewDisabledHud added in v0.10.23

func NewDisabledHud(printer *IncrementalPrinter, store store.RStore) HeadsUpDisplay

func ProvideHud added in v0.10.23

func ProvideHud(hudEnabled HudEnabled, renderer *Renderer, webURL model.WebURL, analytics *analytics.TiltAnalytics, printer *IncrementalPrinter, store store.RStore) (HeadsUpDisplay, error)

type Hud

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

func (*Hud) Close

func (h *Hud) Close()

func (*Hud) OnChange

func (h *Hud) OnChange(ctx context.Context, st store.RStore)

func (*Hud) Refresh

func (h *Hud) Refresh(ctx context.Context)

func (*Hud) Run

func (h *Hud) Run(ctx context.Context, dispatch func(action store.Action), refreshRate time.Duration) error

func (*Hud) SetNarrationMessage

func (h *Hud) SetNarrationMessage(ctx context.Context, msg string)

type HudEnabled added in v0.10.23

type HudEnabled bool

type IncrementalPrinter added in v0.11.4

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

func NewIncrementalPrinter added in v0.11.4

func NewIncrementalPrinter(stdout Stdout) *IncrementalPrinter

func (*IncrementalPrinter) Print added in v0.11.4

func (p *IncrementalPrinter) Print(lines []logstore.LogLine)

func (*IncrementalPrinter) PrintNewline added in v0.13.6

func (p *IncrementalPrinter) PrintNewline()

type Renderer

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

func NewRenderer

func NewRenderer(clock func() time.Time) *Renderer

func (*Renderer) RTY added in v0.12.5

func (r *Renderer) RTY() rty.RTY

func (*Renderer) Render

func (r *Renderer) Render(v view.View, vs view.ViewState)

func (*Renderer) Reset

func (r *Renderer) Reset()

func (*Renderer) SetUp

func (r *Renderer) SetUp() (chan tcell.Event, error)

type ResourceView added in v0.4.1

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

func NewResourceView added in v0.4.1

func NewResourceView(logReader logstore.Reader, res view.Resource, rv view.ResourceViewState, triggerMode model.TriggerMode,
	selected bool, clock func() time.Time) *ResourceView

func (*ResourceView) Build added in v0.4.1

func (v *ResourceView) Build() rty.Component

type StartProfilingAction added in v0.4.2

type StartProfilingAction struct {
}

func (StartProfilingAction) Action added in v0.4.2

func (StartProfilingAction) Action()

type Stdout added in v0.11.4

type Stdout io.Writer

func ProvideStdout added in v0.11.4

func ProvideStdout() Stdout

type StopProfilingAction added in v0.4.2

type StopProfilingAction struct {
}

func (StopProfilingAction) Action added in v0.4.2

func (StopProfilingAction) Action()

type TabView added in v0.7.8

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

func NewTabView added in v0.7.8

func NewTabView(v view.View, vState view.ViewState) *TabView

func (*TabView) Build added in v0.7.8

func (v *TabView) Build() rty.Component

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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