-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathevents.py
More file actions
39 lines (30 loc) · 817 Bytes
/
events.py
File metadata and controls
39 lines (30 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
"""
Event DTO and Storage classes.
The dto is implemented as a namedtuple for performance matters.
"""
from collections import namedtuple
from enum import Enum
Event = namedtuple('Event', [
'key',
'traffic_type_name',
'event_type_id',
'value',
'timestamp',
'properties',
])
EventWrapper = namedtuple('EventWrapper', [
'event',
'size',
])
class SdkEvent(Enum):
"""Public SDK events"""
SDK_READY = 'SDK_READY'
SDK_UPDATE = 'SDK_UPDATE'
class SdkInternalEvent(Enum):
"""Internal SDK events"""
SDK_READY = 'SDK_READY'
FLAGS_UPDATED = 'FLAGS_UPDATED'
FLAG_KILLED_NOTIFICATION = 'FLAG_KILLED_NOTIFICATION'
SEGMENTS_UPDATED = 'SEGMENTS_UPDATED'
RB_SEGMENTS_UPDATED = 'RB_SEGMENTS_UPDATED'
LARGE_SEGMENTS_UPDATED = 'LARGE_SEGMENTS_UPDATED'