Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TtlMap ¶
type TtlMap struct {
// contains filtered or unexported fields
}
func NewConcurrent ¶
func NewConcurrent(capacity int, opts ...TtlMapOption) (*TtlMap, error)
func NewMapWithProvider ¶
func NewMapWithProvider(capacity int, timeProvider timetools.TimeProvider) (*TtlMap, error)
type TtlMapOption ¶
func CallOnExpire ¶
func CallOnExpire(cb Callback) TtlMapOption
CallOnExpire will call this callback on expiration of elements
func Clock ¶
func Clock(c timetools.TimeProvider) TtlMapOption
Clock sets the time provider clock, handy for testing
Click to show internal directories.
Click to hide internal directories.