ticker

package
v0.0.0-...-d050cfb Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2019 License: Apache-2.0, Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Task

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

Task 任务

type Ticker

type Ticker struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Ticker 定时器

type Tickers

type Tickers struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Tickers 定时器集合

func NewTickers

func NewTickers(tickerNum int, tickerTime int64, l *zap.Logger) *Tickers

NewTickers ...

func (*Tickers) AddTask

func (t *Tickers) AddTask(id int64, channel chan bool)

AddTask 添加任务

func (*Tickers) NewID

func (t *Tickers) NewID() int64

NewID 申请ID

func (*Tickers) RemoveTask

func (t *Tickers) RemoveTask(id int64)

RemoveTask 添加任务

Jump to

Keyboard shortcuts

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