Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SimpleCache ¶
type SimpleCache struct {
// contains filtered or unexported fields
}
func NewSimpleCache ¶
func NewSimpleCache() *SimpleCache
func (*SimpleCache) Close ¶
func (c *SimpleCache) Close()
func (*SimpleCache) Delete ¶
func (c *SimpleCache) Delete(key sdk.KeyInfo)
Delete record specified by key.Key If the record has been overwriten it will not be deleted
func (*SimpleCache) Insert ¶
func (c *SimpleCache) Insert(key sdk.KeyInfo, rec sdk.Record)
Insert a new record or overwrite existed one. TODO remove unnessasery copy of []bytes here
func (*SimpleCache) Lookup ¶
Search for record equal to KeyInfo.Key which is not expired at the moment of KeyInfo.Expires TODO remove unnessasery copy of []bytes here
func (*SimpleCache) WatchSheduler ¶
func (c *SimpleCache) WatchSheduler(sched sdk.Scheduler)
Reading records from chan and call Expired func. Should be run in a separete goroutine
Click to show internal directories.
Click to hide internal directories.