store

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 14, 2021 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Memory

type Memory struct {
	// contains filtered or unexported fields
}

func (*Memory) Forever added in v0.0.2

func (m *Memory) Forever(key string, value interface{})

func (*Memory) Get

func (m *Memory) Get() interface{}

func (*Memory) Set

func (m *Memory) Set(key string, value interface{}, d int)

func (*Memory) TTL added in v0.0.2

func (m *Memory) TTL(key string) time.Time

type MemoryStore

type MemoryStore struct {
	// contains filtered or unexported fields
}

func NewStore added in v0.0.2

func NewStore() *MemoryStore

func (*MemoryStore) Clear

func (ms *MemoryStore) Clear() error

func (*MemoryStore) Delete

func (ms *MemoryStore) Delete(key string) error

func (*MemoryStore) Forever

func (ms *MemoryStore) Forever(key string, value interface{}) error

func (*MemoryStore) GC added in v0.0.2

func (ms *MemoryStore) GC()

GC 定期扫删除过期键

func (*MemoryStore) Get

func (ms *MemoryStore) Get(key string) (interface{}, error)

func (*MemoryStore) GetStoreName

func (ms *MemoryStore) GetStoreName() string

func (*MemoryStore) GetTTl added in v0.0.2

func (ms *MemoryStore) GetTTl(key string) (time.Time, error)

func (*MemoryStore) Has

func (ms *MemoryStore) Has(key string) error

func (*MemoryStore) IsExpire added in v0.0.2

func (ms *MemoryStore) IsExpire(key string) (bool, error)

func (*MemoryStore) Set

func (ms *MemoryStore) Set(key string, value interface{}, time int) error

func (*MemoryStore) Size added in v0.0.2

func (ms *MemoryStore) Size() int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL