timer

package
v1.2.38 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashDEL

func HashDEL(key string) error

func HashGetALL

func HashGetALL() (values map[string]Data, err error)

func HashSet

func HashSet(key string, value Data) error

func Init

func Init()

func NewTimer

func NewTimer(id string, timeout time.Duration)

func RegisterCallBackFunc

func RegisterCallBackFunc(_func CallbackFunc)

func ResetTimer

func ResetTimer(id string, timeout time.Duration)

Types

type CallbackFunc

type CallbackFunc func(id string)

type Data

type Data struct {
	Id      string `json:"id"`
	Expired int64  `json:"expire"`
}

func HashGet

func HashGet(key string) (value Data, err error)

Jump to

Keyboard shortcuts

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