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)
DelPrefix deletes records from the MemoryStore's heap when the keys match the given prefix.
func (*MemoryStore) Get ¶
func (m *MemoryStore) Get(key string) (value interface{}, ok bool)
Get retrieves 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) Publish ¶
func (m *MemoryStore) Publish(k string, d interface{})
Publish is a dummy no-op method.
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.