widget

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Widget

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

Widget widget container holder.

func New

func New() (*Widget, error)

New initialize widgets.

func (*Widget) AddBlock

func (w *Widget) AddBlock(txt string, opts ...text.WriteOption) error

AddBlock adds a new block to the widget.

func (*Widget) AddTransaction

func (w *Widget) AddTransaction(txt string, opts ...text.WriteOption) error

AddTransaction adds a new transaction to the widget.

func (*Widget) Cleanup

func (w *Widget) Cleanup()

Cleanup widgets.

func (*Widget) Run

func (w *Widget) Run(ctx context.Context) error

Run the widget view.

func (*Widget) SetBlockProgress

func (w *Widget) SetBlockProgress(percent int, opts ...donut.Option) error

SetBlockProgress sets the progress of the block in the widget.

func (*Widget) SetCurrentNetwork

func (w *Widget) SetCurrentNetwork(txt string, opts ...text.WriteOption) error

SetCurrentNetwork reset the widget and set current network text.

func (*Widget) SetGasAvgBlock

func (w *Widget) SetGasAvgBlock(txt string, opts ...text.WriteOption) error

SetGasAvgBlock resets the widget and sets gas average per block text.

func (*Widget) SetGasAvgTransaction

func (w *Widget) SetGasAvgTransaction(txt string, opts ...text.WriteOption) error

SetGasAvgTransaction resets the widget and sets gas average per transaction text.

func (*Widget) SetGasMax

func (w *Widget) SetGasMax(txt string, opts ...text.WriteOption) error

SetGasMax resets the widget and sets gas max text.

func (*Widget) SetHealth

func (w *Widget) SetHealth(txt string, opts ...text.WriteOption) error

SetHealth resets the widget and sets health text.

func (*Widget) SetLatestGas

func (w *Widget) SetLatestGas(txt string, opts ...text.WriteOption) error

SetLatestGas resets the widget and sets latest gas text.

func (*Widget) SetMaxBlockSize

func (w *Widget) SetMaxBlockSize(txt string, opts ...text.WriteOption) error

SetMaxBlockSize resets the widget and sets max block size text.

func (*Widget) SetMoniker

func (w *Widget) SetMoniker(text string, opts ...text.WriteOption) error

SetMoniker resets the widget and sets moniker text.

func (*Widget) SetPeers

func (w *Widget) SetPeers(peers int, opts ...text.WriteOption) error

SetPeers resets the widget and sets peers text.

func (*Widget) SetSecondsPerBlock

func (w *Widget) SetSecondsPerBlock(txt string, opts ...text.WriteOption) error

SetSecondsPerBlock resets the widget and sets seconds per block text.

func (*Widget) SetTime

func (w *Widget) SetTime(txt string, opts ...text.WriteOption) error

SetTime resets the widget and sets time text.

func (*Widget) SetValidators

func (w *Widget) SetValidators(validators int, opts ...text.WriteOption) error

SetValidators resets the widget and sets validators text.

Jump to

Keyboard shortcuts

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