Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultRecycleInterval = 1 * time.Minute
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ThreadSafeMap ¶
type ThreadSafeMap[T any] struct { // contains filtered or unexported fields }
func NewThreadSafeMap ¶
func NewThreadSafeMap[T any](condition func(item T, afterSetDurtion time.Duration) bool) *ThreadSafeMap[T]
func (*ThreadSafeMap[T]) Delete ¶
func (c *ThreadSafeMap[T]) Delete(key string)
func (*ThreadSafeMap[T]) Get ¶
func (c *ThreadSafeMap[T]) Get(key string) (item T, exists bool)
func (*ThreadSafeMap[T]) List ¶
func (c *ThreadSafeMap[T]) List() []T
func (*ThreadSafeMap[T]) Set ¶
func (c *ThreadSafeMap[T]) Set(key string, obj T)
Click to show internal directories.
Click to hide internal directories.