Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AtomicBool ¶
type AtomicBool struct {
// contains filtered or unexported fields
}
atomicBool is a wrapper around uint32 for usage as a boolean value with atomic access.
func NewAtomicBool ¶
func NewAtomicBool(flag bool) *AtomicBool
func (*AtomicBool) IsSet ¶
func (ab *AtomicBool) IsSet() bool
IsSet returns whether the current boolean value is true
func (*AtomicBool) IsTrue ¶
func (ab *AtomicBool) IsTrue() bool
func (*AtomicBool) Set ¶
func (ab *AtomicBool) Set(value bool)
Set sets the value of the bool regardless of the previous value
type GetValueFunc ¶
type GetValueFunc func() any
type LocalCache ¶
type LocalCache struct {
// contains filtered or unexported fields
}
func NewCache ¶
func NewCache(waitUpdate bool) *LocalCache
func (*LocalCache) Get ¶
func (c *LocalCache) Get(key any) any
func (*LocalCache) UpdateAfter ¶
func (c *LocalCache) UpdateAfter(key any, d time.Duration, f GetValueFunc)
use f to get value
Click to show internal directories.
Click to hide internal directories.