ticker

package
v0.0.0-...-df740be Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package ticker ticker

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option struct {
	MaxRetry int           // max count
	Duration time.Duration // interval
}

Option ticker option

type Refresher

type Refresher interface {
	Refresh()
}

Refresher refresh

type Ticker

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

Ticker ticker

func New

func New(r Refresher, p *Option) *Ticker

New run a refresh tick

func (*Ticker) Start

func (a *Ticker) Start()

Start start ticker

func (*Ticker) Stop

func (a *Ticker) Stop()

Stop stop ticker

Jump to

Keyboard shortcuts

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