Documentation ¶
Index ¶
- type DynamoManager
- type DynamoManagerOptions
- type EmptyManager
- type LocalManager
- func (m *LocalManager) Dispose() error
- func (m *LocalManager) LoadAssignments(envID string, visitorID string) (*common.VisitorAssignments, error)
- func (m *LocalManager) SaveAssignments(envID string, visitorID string, ...) error
- func (d *LocalManager) ShouldSaveAssignments(context connectors.SaveAssignmentsContext) bool
- type LocalOptions
- type MemoryManager
- type RedisManager
- type RedisOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DynamoManager ¶ added in v0.2.0
type DynamoManager struct {
// contains filtered or unexported fields
}
func InitDynamoManager ¶ added in v0.2.0
func InitDynamoManager(options DynamoManagerOptions) *DynamoManager
func (*DynamoManager) LoadAssignments ¶ added in v0.2.0
func (d *DynamoManager) LoadAssignments(envID string, visitorID string) (*common.VisitorAssignments, error)
LoadAssignments gets all the visitor cache assignments for a specific env ID and visitor ID
func (*DynamoManager) SaveAssignments ¶ added in v0.2.0
func (d *DynamoManager) SaveAssignments(envID string, visitorID string, vgIDAssignments map[string]*common.VisitorCache, date time.Time) error
SaveAssignments saves all visitor new assignments into dynamo table
func (*DynamoManager) ShouldSaveAssignments ¶ added in v0.2.0
func (d *DynamoManager) ShouldSaveAssignments(context connectors.SaveAssignmentsContext) bool
type DynamoManagerOptions ¶ added in v0.2.0
type DynamoManagerOptions struct { Client dynamodbiface.DynamoDBAPI TableName string PrimaryKeySeparator string PrimaryKeyField string GetItemTimeout time.Duration LogLevel string LogFormat logger.LogFormat }
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) error
func (*EmptyManager) ShouldSaveAssignments ¶ added in v0.2.0
func (d *EmptyManager) ShouldSaveAssignments(context connectors.SaveAssignmentsContext) bool
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) error
SaveAssignments saves the campaigns in cache for this visitor
func (*LocalManager) ShouldSaveAssignments ¶ added in v0.2.0
func (d *LocalManager) ShouldSaveAssignments(context connectors.SaveAssignmentsContext) bool
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) error
func (*MemoryManager) ShouldSaveAssignments ¶ added in v0.2.0
func (d *MemoryManager) ShouldSaveAssignments(context connectors.SaveAssignmentsContext) bool
type RedisManager ¶
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) error
SaveAssignments saves the assignments in cache for this visitor
func (*RedisManager) ShouldSaveAssignments ¶ added in v0.2.0
func (d *RedisManager) ShouldSaveAssignments(context connectors.SaveAssignmentsContext) bool
Click to show internal directories.
Click to hide internal directories.