Documentation ¶
Overview ¶
Package data provides an interface for common data store operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemoryStore ¶
type MemoryStore struct {
// contains filtered or unexported fields
}
MemoryStore is an implementation for memory based data store.
func (*MemoryStore) DelPrefix ¶
func (m *MemoryStore) DelPrefix(prefix string)
func (*MemoryStore) Get ¶
func (m *MemoryStore) Get(key string) (value interface{}, ok bool)
Get retrieve the value pointed by the key.
func (*MemoryStore) IncrBy ¶
func (m *MemoryStore) IncrBy(key string, delta int64) (newVal int64)
IncrBy increments the value pointed by key with the delta, and return the new value.
func (*MemoryStore) Set ¶
func (m *MemoryStore) Set(key string, value interface{}) bool
Set stores the key value pair.
Click to show internal directories.
Click to hide internal directories.