mxspinner

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: May 13, 2025 License: MIT Imports: 6 Imported by: 0

README

/internal/ui/mxspinner

mxspinner uses mutex to pass data to the bubbletea model.

The task can choose between blocking or non-blocking method when it's passing data to bubbletea model.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(init string, f Task) error

Types

type Spinner

type Spinner struct {
	Error error // error returned from task
	// contains filtered or unexported fields
}

func New

func New(init string, f Task) Spinner

func (Spinner) Init

func (m Spinner) Init() tea.Cmd

func (Spinner) Update

func (m Spinner) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Spinner) View

func (m Spinner) View() string

type Task

type Task func(store *store.Store[string], quit <-chan bool) error

Interactive work procedure.

Jump to

Keyboard shortcuts

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