gui

package
v0.0.0-...-e3230a5 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

gui package contains the main vanity gui interface that provides convinence and channels to windows.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewImageBox

func NewImageBox(img image.Image, viewWidth, viewHeight int) *imageBox

func PreviewMonkeys

func PreviewMonkeys(ctx context.Context, previewChan chan<- MonkeyPreview, monkeyDataChan <-chan engine.MonkeyStats)

Types

type MainApp

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

func NewMainApp

func NewMainApp(ctx context.Context, mainCancel context.CancelFunc, title string, odds float64, log *logrus.Logger, pipeMode bool) *MainApp

func (*MainApp) DebugPressEsc

func (m *MainApp) DebugPressEsc()

func (*MainApp) Done

func (mainApp *MainApp) Done() <-chan struct{}

func (*MainApp) Fire

func (a *MainApp) Fire(entry *logrus.Entry) error

func (*MainApp) ForceDebugResize

func (a *MainApp) ForceDebugResize()

ForceDebugResize is required when adding a previous screen because widht and height will not be setup correct, this seems like a bug.

func (*MainApp) ForceQuit

func (mainApp *MainApp) ForceQuit()

func (*MainApp) GetFoundStat

func (a *MainApp) GetFoundStat() uint64

func (*MainApp) GetTotalStat

func (a *MainApp) GetTotalStat() uint64

func (*MainApp) HandleEvent

func (mainApp *MainApp) HandleEvent(event *tcell.EventKey) *tcell.EventKey

func (*MainApp) Levels

func (a *MainApp) Levels() []logrus.Level

func (*MainApp) PNGPreviewChan

func (a *MainApp) PNGPreviewChan() (monkeyPreviewChan chan<- MonkeyPreview)

PNGPreviewChan is a channel png images can be piped to and they will go to the appropriate preivew panes.

func (*MainApp) Quit

func (m *MainApp) Quit()

func (*MainApp) Run

func (m *MainApp) Run(endTime time.Time)

func (*MainApp) SetPreview

func (a *MainApp) SetPreview(index int, img image.Image, title string)

func (*MainApp) SetTerminalScreen

func (a *MainApp) SetTerminalScreen(s tcell.Screen)

func (*MainApp) TotalDeltaChan

func (a *MainApp) TotalDeltaChan() chan<- engine.Stats

func (*MainApp) UpdateFoundStat

func (a *MainApp) UpdateFoundStat(additional uint64)

func (*MainApp) UpdateSpeed

func (a *MainApp) UpdateSpeed()

func (*MainApp) UpdateStats

func (a *MainApp) UpdateStats(stats engine.Stats)

func (*MainApp) UpdateTotal

func (a *MainApp) UpdateTotal()

func (*MainApp) UpdateTotalRequestsStat

func (a *MainApp) UpdateTotalRequestsStat(additional uint64)

func (*MainApp) UpdateTotalStat

func (a *MainApp) UpdateTotalStat(additional uint64)

type MonkeyPreview

type MonkeyPreview struct {
	Image image.Image
	Title string
}

Jump to

Keyboard shortcuts

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