hud

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultRefreshInterval = 1 * time.Second

The main loop ensures the HUD updates at least this often

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeHud

type FakeHud struct {
	LastView view.View
	Updates  chan view.View
	Canceled bool
	Closed   bool
	// contains filtered or unexported fields
}

func NewFakeHud

func NewFakeHud() *FakeHud

func (*FakeHud) Close

func (h *FakeHud) Close()

func (*FakeHud) OnChange

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

func (*FakeHud) Refresh

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

func (*FakeHud) Run

func (h *FakeHud) Run(ctx context.Context, st *store.Store, refreshInterval time.Duration) error

func (*FakeHud) SetNarrationMessage

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

func (*FakeHud) Update

func (h *FakeHud) Update(v view.View) error

type HeadsUpDisplay

type HeadsUpDisplay interface {
	store.Subscriber

	Run(ctx context.Context, st *store.Store, refreshRate time.Duration) error
	Update(v view.View) error
	Close()
	SetNarrationMessage(ctx context.Context, msg string)
}

func NewDefaultHeadsUpDisplay

func NewDefaultHeadsUpDisplay() (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.Store)

func (*Hud) Refresh

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

func (*Hud) Run

func (h *Hud) Run(ctx context.Context, st *store.Store, refreshRate time.Duration) error

func (*Hud) SetNarrationMessage

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

func (*Hud) Update

func (h *Hud) Update(v view.View) error

type ReadyEvent

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

type Renderer

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

func NewRenderer

func NewRenderer() *Renderer

func (*Renderer) Render

func (r *Renderer) Render(v view.View) error

func (*Renderer) Reset

func (r *Renderer) Reset()

func (*Renderer) SetUp

func (r *Renderer) SetUp(event ReadyEvent, sigwinch chan os.Signal) (chan tcell.Event, error)

type ServerAdapter

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

func NewServer

func NewServer(ctx context.Context) (*ServerAdapter, error)

func (*ServerAdapter) Close

func (a *ServerAdapter) Close()

func (*ServerAdapter) ConnectHud

func (a *ServerAdapter) ConnectHud(stream proto.Hud_ConnectHudServer) error

type ShowErrorAction

type ShowErrorAction struct {
	// 1-based index of resource whose log should be printed
	ResourceNumber int
}

func NewShowErrorAction

func NewShowErrorAction(resourceNumber int) ShowErrorAction

func (ShowErrorAction) Action

func (ShowErrorAction) Action()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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