Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmptyManager ¶
type EmptyManager struct{}
func (*EmptyManager) LoadAssignments ¶
func (*EmptyManager) LoadAssignments(envID string, visitorID string) (*common.VisitorAssignments, error)
func (*EmptyManager) SaveAssignments ¶
func (*EmptyManager) SaveAssignments(envID string, visitorID string, vgIDAssignments map[string]*common.VisitorCache, date time.Time, context connectors.SaveAssignmentsContext) error
type LocalManager ¶
type LocalManager struct {
// contains filtered or unexported fields
}
LocalManager represents the local db manager object
func InitLocalCacheManager ¶
func InitLocalCacheManager(localOptions LocalOptions) (m *LocalManager, err error)
func (*LocalManager) LoadAssignments ¶
func (m *LocalManager) LoadAssignments(envID string, visitorID string) (*common.VisitorAssignments, error)
LoadAssignments returns the visitor assignment in cache
func (*LocalManager) SaveAssignments ¶
func (m *LocalManager) SaveAssignments(envID string, visitorID string, vgIDAssignments map[string]*common.VisitorCache, date time.Time, context connectors.SaveAssignmentsContext) error
Set saves the campaigns in cache for this visitor
type LocalOptions ¶
type LocalOptions struct { DbPath string // contains filtered or unexported fields }
LocalOptions are the options necessary to make the local cache manager work
type MemoryManager ¶
type MemoryManager struct {
// contains filtered or unexported fields
}
func InitMemoryManager ¶
func InitMemoryManager() *MemoryManager
func (*MemoryManager) LoadAssignments ¶
func (m *MemoryManager) LoadAssignments(envID string, visitorID string) (*common.VisitorAssignments, error)
func (*MemoryManager) SaveAssignments ¶
func (m *MemoryManager) SaveAssignments(envID string, visitorID string, vgIDAssignments map[string]*common.VisitorCache, date time.Time, context connectors.SaveAssignmentsContext) error
type RedisManager ¶
type RedisManager struct {
// contains filtered or unexported fields
}
RedisManager represents a redis db manager object
func InitRedisManager ¶
func InitRedisManager(options RedisOptions) (*RedisManager, error)
func (*RedisManager) LoadAssignments ¶
func (m *RedisManager) LoadAssignments(envID string, visitorID string) (*common.VisitorAssignments, error)
Get returns the campaigns in cache for this visitor
func (*RedisManager) SaveAssignments ¶
func (m *RedisManager) SaveAssignments(envID string, visitorID string, vgIDAssignments map[string]*common.VisitorCache, date time.Time, context connectors.SaveAssignmentsContext) error
SaveAssignments saves the assignments in cache for this visitor
Click to show internal directories.
Click to hide internal directories.