ticker

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithInterval

func WithInterval(interval time.Duration) func(*Opts)

Types

type MockTicker

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

func NewMock

func NewMock() *MockTicker

func (*MockTicker) Go

func (t *MockTicker) Go(ctx context.Context, f func(context.Context))

func (*MockTicker) Tick

func (t *MockTicker) Tick()

type Opts

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

type Ticker

type Ticker interface {
	Go(ctx context.Context, f func(context.Context))
}

type TimeTicker

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

func New

func New(opts ...func(*Opts)) TimeTicker

func (TimeTicker) Go

func (t TimeTicker) Go(ctx context.Context, f func(context.Context))

Jump to

Keyboard shortcuts

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