ticker

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: LGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package ticker contains the Model and Update function to work with a Go Ticker.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	Ticker *time.Ticker
}

Model is the bubbletea model storing the data of the Ticker.

func (Model) Tick

func (m Model) Tick() tea.Msg

Tick passes the Msg when the ticker is triggered.

func (Model) Update

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

Update prepare the dispose method and emit a tick for listening the channel.

type Msg

type Msg time.Time

Msg is the ticking message that must be passed to the Init or Update function.

Jump to

Keyboard shortcuts

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