timeout

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2024 License: MIT Imports: 3 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(timeout time.Duration, data interface{}) tea.Cmd

Init Start Timeout ticker using with timeout in seconds and optional data.

func Str

func Str(timeout time.Duration) string

Str produce Timeout String to be rendered.

func Tick

func Tick(timeoutValue time.Duration, data interface{}) tea.Cmd

Start ticker.

Types

type TickTimeoutMsg

type TickTimeoutMsg struct {
	TimeoutValue time.Duration
	Data         interface{}
}

TickTimeoutMsg will be dispatched for every tick. Containing current timeout value and optional parameter to be used when handling the timeout msg.

Jump to

Keyboard shortcuts

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