Documentation ¶
Index ¶
- type Item
- type MemoryTTLStorage
- func (mts *MemoryTTLStorage) Add(key string, content interface{}, ttl *int64)
- func (mts *MemoryTTLStorage) Delete(key string)
- func (mts *MemoryTTLStorage) Get(key string) (interface{}, bool)
- func (mts *MemoryTTLStorage) GetAndRefresh(key string) (interface{}, bool)
- func (mts *MemoryTTLStorage) NewBackupTicker() *time.Ticker
- func (mts *MemoryTTLStorage) NewCleanerTicker(tickerTime time.Duration) *time.Ticker
- func (mts *MemoryTTLStorage) RegisterInterface(i interface{})
- func (mts *MemoryTTLStorage) SetDefaultTTL(defaultTTL int64)
- func (mts *MemoryTTLStorage) Stop()
- type MemoryTTLStoreConfig
- type StorageManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemoryTTLStorage ¶
type MemoryTTLStorage struct {
// contains filtered or unexported fields
}
func New ¶
func New(cfg *MemoryTTLStoreConfig) *MemoryTTLStorage
func (*MemoryTTLStorage) Add ¶
func (mts *MemoryTTLStorage) Add(key string, content interface{}, ttl *int64)
func (*MemoryTTLStorage) Delete ¶
func (mts *MemoryTTLStorage) Delete(key string)
func (*MemoryTTLStorage) Get ¶
func (mts *MemoryTTLStorage) Get(key string) (interface{}, bool)
func (*MemoryTTLStorage) GetAndRefresh ¶
func (mts *MemoryTTLStorage) GetAndRefresh(key string) (interface{}, bool)
func (*MemoryTTLStorage) NewBackupTicker ¶
func (mts *MemoryTTLStorage) NewBackupTicker() *time.Ticker
func (*MemoryTTLStorage) NewCleanerTicker ¶
func (mts *MemoryTTLStorage) NewCleanerTicker(tickerTime time.Duration) *time.Ticker
func (*MemoryTTLStorage) RegisterInterface ¶
func (mts *MemoryTTLStorage) RegisterInterface(i interface{})
func (*MemoryTTLStorage) SetDefaultTTL ¶
func (mts *MemoryTTLStorage) SetDefaultTTL(defaultTTL int64)
func (*MemoryTTLStorage) Stop ¶
func (mts *MemoryTTLStorage) Stop()
type MemoryTTLStoreConfig ¶
type StorageManager ¶
type StorageManager struct {
// contains filtered or unexported fields
}
func NewStorageManager ¶
func NewStorageManager(backupFilePath string) *StorageManager
func (*StorageManager) Restore ¶
func (b *StorageManager) Restore(i interface{}) error
func (*StorageManager) Store ¶
func (b *StorageManager) Store(i interface{}) error
Click to show internal directories.
Click to hide internal directories.