gryffin: github.com/yahoo/gryffin/data Index | Files

package data

import "github.com/yahoo/gryffin/data"

Package data provides an interface for common data store operations.

Index

Package Files

memory.go store.go

type MemoryStore Uses

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

MemoryStore is an implementation for memory based data store.

func NewMemoryStore Uses

func NewMemoryStore() *MemoryStore

NewMemoryStore creates the new store.

func (*MemoryStore) DelPrefix Uses

func (m *MemoryStore) DelPrefix(prefix string)

func (*MemoryStore) Get Uses

func (m *MemoryStore) Get(key string) (value interface{}, ok bool)

Get retrieve the value pointed by the key.

func (*MemoryStore) IncrBy Uses

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 Uses

func (m *MemoryStore) Publish(k string, d interface{})

Dummy method

func (*MemoryStore) Set Uses

func (m *MemoryStore) Set(key string, value interface{}) bool

Set stores the key value pair.

type Store Uses

type Store interface {
    Get(key string) (value interface{}, ok bool)
    Set(key string, value interface{}) bool
    IncrBy(key string, delta int64) (newVal int64)
    Publish(key string, value interface{})
}

Store is an interface that capture all methods supported for a data store.

Package data imports 2 packages (graph) and is imported by 1 packages. Updated 2016-08-02. Refresh now. Tools for package owners.