Documentation
¶
Index ¶
- Constants
- type Compressor
- type Dummy
- func (d *Dummy) Close() error
- func (d *Dummy) DeleteAnonymousEvent(tokenID, anonymousID string, eventID ...string) error
- func (d *Dummy) GetAnonymousEvents(tokenID, anonymousID string) (map[string]string, error)
- func (d *Dummy) SaveAnonymousEvent(tokenID, anonymousID, eventID, payload string) error
- func (d *Dummy) Type() string
- type DummyCompressor
- type EventKey
- type GZIPCompressor
- type Queue
- type RecognitionPayload
- type RecognitionService
- type Redis
- func (r *Redis) Close() error
- func (r *Redis) DeleteAnonymousEvent(tokenID, anonymousID string, eventID ...string) error
- func (r *Redis) GetAnonymousEvents(tokenID, anonymousID string) (map[string]string, error)
- func (r *Redis) SaveAnonymousEvent(tokenID, anonymousID, eventID, payload string) error
- func (r *Redis) Type() string
- type Storage
Constants ¶
View Source
const ( AnonymousQueueName = "users_recognition" IdentifiedQueueName = "users_identified" AggregatedQueueName = "users_aggregated" )
View Source
const ( DummyStorageType = "dummy" RedisStorageType = "redis" )
View Source
const (
GZIPCompressorType = "gzip"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compressor ¶
type Dummy ¶
type Dummy struct{}
func (*Dummy) DeleteAnonymousEvent ¶
func (*Dummy) GetAnonymousEvents ¶
func (*Dummy) SaveAnonymousEvent ¶
type DummyCompressor ¶
type DummyCompressor struct{}
func (*DummyCompressor) Compress ¶
func (dc *DummyCompressor) Compress(payload interface{}) []byte
func (*DummyCompressor) Decompress ¶
func (dc *DummyCompressor) Decompress(compressed []byte) (map[string]interface{}, error)
type GZIPCompressor ¶
type GZIPCompressor struct{}
func (*GZIPCompressor) Compress ¶
func (c *GZIPCompressor) Compress(payload interface{}) []byte
func (*GZIPCompressor) Decompress ¶
func (c *GZIPCompressor) Decompress(compressed []byte) (map[string]interface{}, error)
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
func (*Queue) DequeueBlock ¶
type RecognitionPayload ¶
type RecognitionPayload struct { EventID string EventKey EventKey AnonymousEventBytes string IdentificationValues map[string]interface{} }
RecognitionPayload is a queue dto
type RecognitionService ¶
type RecognitionService struct {
// contains filtered or unexported fields
}
RecognitionService has a thread pool under the hood saves anonymous events in meta storage rewrites recognized events
func NewRecognitionService ¶
func NewRecognitionService(storage Storage, destinationService *destinations.Service, configuration *config.UsersRecognition, userAgentPath string) (*RecognitionService, error)
NewRecognitionService creates a new RecognitionService if metaStorage configuration exists
func (*RecognitionService) Close ¶
func (rs *RecognitionService) Close() (multiErr error)
Close sets closed flag = true (stop goroutines) closes the queue
type Redis ¶
type Redis struct {
// contains filtered or unexported fields
}
func (*Redis) DeleteAnonymousEvent ¶
DeleteAnonymousEvent deletes event with eventID
func (*Redis) GetAnonymousEvents ¶
GetAnonymousEvents returns events JSON per event ID map
func (*Redis) SaveAnonymousEvent ¶
SaveAnonymousEvent saves event JSON by tokenID and user anonymous ID key
Source Files
¶
Click to show internal directories.
Click to hide internal directories.