Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MapWithExpiry ¶
type MapWithExpiry struct {
// contains filtered or unexported fields
}
MapWithExpiry act like a map which provide a method to clean up expired entries
func NewMapWithExpiry ¶
func NewMapWithExpiry(ttl time.Duration) *MapWithExpiry
func (*MapWithExpiry) CleanUp ¶
func (m *MapWithExpiry) CleanUp(now time.Time)
func (*MapWithExpiry) Delete ¶ added in v1.247346.0
func (m *MapWithExpiry) Delete(key string)
func (*MapWithExpiry) Get ¶
func (m *MapWithExpiry) Get(key string) (interface{}, bool)
func (*MapWithExpiry) Set ¶
func (m *MapWithExpiry) Set(key string, content interface{})
func (*MapWithExpiry) Size ¶
func (m *MapWithExpiry) Size() int
Click to show internal directories.
Click to hide internal directories.