Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ExpireNever is the TTL value to use for an object that should never expire ExpireNever = time.Duration(-1) )
Variables ¶
View Source
var ( // ErrorKeyUsed is returned for an attempt to store an object using an existing key is made ErrorKeyUsed = errors.New("the key specified is in use") // ErrorStorageFull is returned when the max item limit for object storage has been reached ErrorStorageFull = errors.New("storage limit has been reached") )
Functions ¶
This section is empty.
Types ¶
type Object ¶
Object is the structure that holds an item that will be stored in memory. It can hold a TTL so that
type Storage ¶
Storage implements StoreRetriever for inmemory storage
func New ¶
New initialises a new in memory store expiry sets the time before an object is deleted scrubInterval is the interval at which the scrubber will run to clean up expired items
Click to show internal directories.
Click to hide internal directories.