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)
Click to show internal directories.
Click to hide internal directories.