delay

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(ctx context.Context, id string, d time.Duration)

func NewDelayTask

func NewDelayTask(d *Delay) scheduler.Task

Types

type Delay

type Delay struct {
	TryCount  uint16                   `json:"try"`
	Id        string                   `json:"id"`
	TimePoint scheduler.UnixTimeSecond `json:"tp"`
}

func FromBytes

func FromBytes(b []byte) *Delay

func (*Delay) Run

func (d *Delay) Run(ctx context.Context, schedulerTime scheduler.UnixTimeSecond)

func (*Delay) ToBytes

func (d *Delay) ToBytes() []byte

Jump to

Keyboard shortcuts

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