Documentation ¶
Overview ¶
Package odp //
Index ¶
- type DefaultOdpManager
- func (om *DefaultOdpManager) FetchQualifiedSegments(userID string, options []segment.OptimizelySegmentOption) (segments []string, err error)
- func (om *DefaultOdpManager) IdentifyUser(userID string)
- func (om *DefaultOdpManager) SendOdpEvent(eventType, action string, identifiers map[string]string, ...) (err error)
- func (om *DefaultOdpManager) Update(apiKey, apiHost string, segmentsToCheck []string)
- type Manager
- type OMOptionFunc
- func WithEventManager(eventManager event.Manager) OMOptionFunc
- func WithSegmentManager(segmentManager segment.Manager) OMOptionFunc
- func WithSegmentsCache(segmentsCache cache.Cache) OMOptionFunc
- func WithSegmentsCacheSize(segmentsCacheSize int) OMOptionFunc
- func WithSegmentsCacheTimeout(segmentsCacheTimeout time.Duration) OMOptionFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultOdpManager ¶
type DefaultOdpManager struct { OdpConfig config.Config SegmentManager segment.Manager EventManager event.Manager // contains filtered or unexported fields }
DefaultOdpManager represents default implementation of odp manager
func NewOdpManager ¶
func NewOdpManager(sdkKey string, disable bool, options ...OMOptionFunc) *DefaultOdpManager
NewOdpManager creates and returns a new instance of DefaultOdpManager.
func (*DefaultOdpManager) FetchQualifiedSegments ¶
func (om *DefaultOdpManager) FetchQualifiedSegments(userID string, options []segment.OptimizelySegmentOption) (segments []string, err error)
FetchQualifiedSegments fetches and returns qualified segments
func (*DefaultOdpManager) IdentifyUser ¶
func (om *DefaultOdpManager) IdentifyUser(userID string)
IdentifyUser associates a full-stack userid with an established VUID
func (*DefaultOdpManager) SendOdpEvent ¶
func (om *DefaultOdpManager) SendOdpEvent(eventType, action string, identifiers map[string]string, data map[string]interface{}) (err error)
SendOdpEvent sends an event to the ODP server.
func (*DefaultOdpManager) Update ¶
func (om *DefaultOdpManager) Update(apiKey, apiHost string, segmentsToCheck []string)
Update updates odp config.
type Manager ¶
type Manager interface { FetchQualifiedSegments(userID string, options []segment.OptimizelySegmentOption) (segments []string, err error) IdentifyUser(userID string) SendOdpEvent(eventType, action string, identifiers map[string]string, data map[string]interface{}) (err error) Update(apiKey, apiHost string, segmentsToCheck []string) }
Manager represents the odp manager.
type OMOptionFunc ¶
type OMOptionFunc func(em *DefaultOdpManager)
OMOptionFunc are the ODPManager options that give you the ability to add one more more options before the odp manager is initialized.
func WithEventManager ¶
func WithEventManager(eventManager event.Manager) OMOptionFunc
WithEventManager sets eventManager option to be passed into the NewOdpManager method
func WithSegmentManager ¶
func WithSegmentManager(segmentManager segment.Manager) OMOptionFunc
WithSegmentManager sets segmentManager option to be passed into the NewOdpManager method
func WithSegmentsCache ¶
func WithSegmentsCache(segmentsCache cache.Cache) OMOptionFunc
WithSegmentsCache sets cache option to be passed into the NewOdpManager method
func WithSegmentsCacheSize ¶
func WithSegmentsCacheSize(segmentsCacheSize int) OMOptionFunc
WithSegmentsCacheSize sets segmentsCacheSize option to be passed into the NewOdpManager method.
func WithSegmentsCacheTimeout ¶
func WithSegmentsCacheTimeout(segmentsCacheTimeout time.Duration) OMOptionFunc
WithSegmentsCacheTimeout sets segmentsCacheTimeout option to be passed into the NewOdpManager method