ticker

package
v0.15.83 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package ticker provides a context-aware ticker with callback and status tracking.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ticker

type Ticker[T any] struct {
	// contains filtered or unexported fields
}

func New

func New[T any](ctx context.Context, every time.Duration, value T, run func(ctx context.Context, value T, count int)) *Ticker[T]

func (*Ticker[T]) Count

func (t *Ticker[T]) Count() int

func (*Ticker[T]) GetValue added in v0.14.66

func (t *Ticker[T]) GetValue() T

func (*Ticker[T]) SetValue added in v0.14.66

func (t *Ticker[T]) SetValue(value T)

func (*Ticker[T]) Stop

func (t *Ticker[T]) Stop()

Jump to

Keyboard shortcuts

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