concurrent

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2025 License: Apache-2.0 Imports: 5 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DailyOnce

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

func NewDailyOnce

func NewDailyOnce() *DailyOnce

func (*DailyOnce) Do

func (d *DailyOnce) Do(initFunc func())

获取数据(自动处理每日重置)

type PeriodOnce

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

PeriodOnce 周期性懒加载锁

func CreatePeriodOnceWithHourAndMinute added in v0.0.19

func CreatePeriodOnceWithHourAndMinute(hour, minute int) *PeriodOnce

CreatePeriodOnceWithHourAndMinute 创建每日按时分初始化的周期性懒加载锁

func CreatePeriodOnceWithSecond added in v0.0.19

func CreatePeriodOnceWithSecond(seconds int) *PeriodOnce

CreatePeriodOnceWithSecond 创建间隔秒数初始化的周期性懒加载锁

func (*PeriodOnce) Do

func (o *PeriodOnce) Do(f func())

Jump to

Keyboard shortcuts

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