Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadSysMemStats ¶
func ReadSysMemStats(s *SysMemStats) error
ReadSysMemStats reads the system memory statistics into s.
Types ¶
type Cache ¶
type Cache interface { // SetMaxItems sets the maximum number of items the cache can hold to n SetMaxItems(n uint) // SetMinFreeMemory sets the minimum amount of free memory // in bytes before the cache starts evicting objects. SetMinFreeMemory(v uint64) // SetTimeout sets a default timeout duration for cache items in milliseconds. SetTimeout(ms uint) // Put stores and pushes the item to the front of the cache. Put(k string, v interface{}) // Get gets the item from the cache and pushes it to the front. Get(k string) (interface{}, bool) // Del removes the item from the cache. Del(k string) // Len returns the number of items stored in the cache. Len() int // Evict removes the oldest n items from the cache. Evict(n uint) }
type SysMemStats ¶
Click to show internal directories.
Click to hide internal directories.