status

package
v0.64.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StatusManager

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

StatusManager's job is to handle queuing of loading states and toast notifications that you see at the bottom left of the screen.

func NewStatusManager

func NewStatusManager() *StatusManager

func (*StatusManager) AddToastStatus

func (self *StatusManager) AddToastStatus(message string, kind types.ToastKind) int

func (*StatusManager) ClaimRenderLoop added in v0.64.0

func (self *StatusManager) ClaimRenderLoop() bool

ClaimRenderLoop is called by whoever just added a status; it reports whether they must start the render loop. When it returns false, a loop is already running and will pick the new status up on its next tick.

func (*StatusManager) GetStatusString

func (self *StatusManager) GetStatusString(userConfig *config.UserConfig) (string, gocui.Attribute)

func (*StatusManager) HasStatus

func (self *StatusManager) HasStatus() bool

func (*StatusManager) ReleaseRenderLoopIfEmpty added in v0.64.0

func (self *StatusManager) ReleaseRenderLoopIfEmpty() bool

ReleaseRenderLoopIfEmpty is called by the render loop after each frame it draws; a true result releases the loop's claim and tells it to exit, because there are no statuses left to draw. The emptiness check and the release are atomic with respect to ClaimRenderLoop, so a status added around this moment either sees the still-running loop or starts a fresh one — it can't end up unrendered.

func (*StatusManager) WithWaitingStatus

func (self *StatusManager) WithWaitingStatus(message string, renderFunc func(), f func(*WaitingStatusHandle) error) error

type WaitingStatusHandle added in v0.41.0

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

Can be used to manipulate a waiting status while it is running (e.g. pause and resume it)

func (*WaitingStatusHandle) Hide added in v0.41.0

func (self *WaitingStatusHandle) Hide()

func (*WaitingStatusHandle) Show added in v0.41.0

func (self *WaitingStatusHandle) Show()

Jump to

Keyboard shortcuts

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