Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetContextWithCancel ¶ added in v1.11.5
func GetContextWithCancel() (context.Context, context.CancelFunc)
Types ¶
type RollingMutex ¶
type RollingMutex struct {
// contains filtered or unexported fields
}
RollingMutex 按指定rolling策略加锁, 指定周期内只加载一次
滑动窗口锁, 窗口期内只初始化一次, 目前只支持1天切换
func (*RollingMutex) Date ¶
func (o *RollingMutex) Date() string
func (*RollingMutex) Do ¶
func (o *RollingMutex) Do(f func(), today ...func() (newDate string))
func (*RollingMutex) Reset ¶
func (o *RollingMutex) Reset()
Click to show internal directories.
Click to hide internal directories.