stores

package
v0.0.0-...-c9c0c0f Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

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 implements the Store interface defined by the experimento project by holding all the necessary data in memory, in a map.

func NewMemoryStore

func NewMemoryStore() *MemoryStore

NewMemoryStore returns a new, empty MemoryStore.

func (*MemoryStore) GetExperimentGroup

func (store *MemoryStore) GetExperimentGroup(entityID, expID string) (string, error)

GetExperimentGroup returns the id of the group in which a specific entity id finds itself, in a specific experiment.

func (*MemoryStore) SetExperimentGroup

func (store *MemoryStore) SetExperimentGroup(entityID, expID, group string) error

SetExperimentGroup sets the experiment group for a particular entity and experiment, by saving the group id in memory.

type RedisStore

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

func NewRedisStore

func NewRedisStore(addr, password string) (*RedisStore, error)

func (*RedisStore) GetExperimentGroup

func (store *RedisStore) GetExperimentGroup(c context.Context, m *data.StoreMessage) (*data.StoreMessage, error)

func (*RedisStore) SetExperimentGroup

func (store *RedisStore) SetExperimentGroup(c context.Context, m *data.StoreMessage) (*data.Response, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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