Repository navigation
Expand file tree
/
Copy pathconst.py
More file actions
155 lines (145 loc) · 3.88 KB
/
Copy pathconst.py
File metadata and controls
155 lines (145 loc) · 3.88 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
"""
This module a set of constants for the package.
"""
IPROTO_REQUEST_TYPE = 0x00
IPROTO_SYNC = 0x01
# replication keys (header)
IPROTO_SERVER_ID = 0x02
IPROTO_LSN = 0x03
IPROTO_TIMESTAMP = 0x04
IPROTO_SCHEMA_ID = 0X05
#
IPROTO_SPACE_ID = 0x10
IPROTO_INDEX_ID = 0x11
IPROTO_LIMIT = 0x12
IPROTO_OFFSET = 0x13
IPROTO_ITERATOR = 0x14
IPROTO_INDEX_BASE = 0x15
#
IPROTO_KEY = 0x20
IPROTO_TUPLE = 0x21
IPROTO_FUNCTION_NAME = 0x22
IPROTO_USER_NAME = 0x23
#
IPROTO_SERVER_UUID = 0x24
IPROTO_CLUSTER_UUID = 0x25
IPROTO_VCLOCK = 0x26
IPROTO_EXPR = 0x27
IPROTO_OPS = 0x28
#
IPROTO_DATA = 0x30
IPROTO_ERROR_24 = 0x31
#
IPROTO_METADATA = 0x32
IPROTO_SQL_TEXT = 0x40
IPROTO_SQL_BIND = 0x41
IPROTO_SQL_INFO = 0x42
IPROTO_SQL_INFO_ROW_COUNT = 0x00
IPROTO_SQL_INFO_AUTOINCREMENT_IDS = 0x01
#
IPROTO_ERROR = 0x52
#
IPROTO_VERSION = 0x54
IPROTO_FEATURES = 0x55
IPROTO_AUTH_TYPE = 0x5b
IPROTO_CHUNK = 0x80
IPROTO_GREETING_SIZE = 128
IPROTO_BODY_MAX_LEN = 2147483648
REQUEST_TYPE_OK = 0x00
REQUEST_TYPE_SELECT = 0x01
REQUEST_TYPE_INSERT = 0x02
REQUEST_TYPE_REPLACE = 0x03
REQUEST_TYPE_UPDATE = 0x04
REQUEST_TYPE_DELETE = 0x05
REQUEST_TYPE_CALL16 = 0x06
REQUEST_TYPE_AUTHENTICATE = 0x07
REQUEST_TYPE_EVAL = 0x08
REQUEST_TYPE_UPSERT = 0x09
REQUEST_TYPE_CALL = 0x0a
REQUEST_TYPE_EXECUTE = 0x0b
REQUEST_TYPE_PING = 0x40
REQUEST_TYPE_JOIN = 0x41
REQUEST_TYPE_SUBSCRIBE = 0x42
REQUEST_TYPE_ID = 0x49
REQUEST_TYPE_ERROR = 1 << 15
SPACE_SCHEMA = 272
SPACE_SPACE = 280
SPACE_INDEX = 288
SPACE_FUNC = 296
SPACE_VSPACE = 281
SPACE_VINDEX = 289
SPACE_VFUNC = 297
SPACE_USER = 304
SPACE_PRIV = 312
SPACE_CLUSTER = 320
INDEX_SPACE_PRIMARY = 0
INDEX_SPACE_NAME = 2
INDEX_INDEX_PRIMARY = 0
INDEX_INDEX_NAME = 2
ITERATOR_EQ = 0
ITERATOR_REQ = 1
ITERATOR_ALL = 2
ITERATOR_LT = 3
ITERATOR_LE = 4
ITERATOR_GE = 5
ITERATOR_GT = 6
ITERATOR_BITSET_ALL_SET = 7
ITERATOR_BITSET_ANY_SET = 8
ITERATOR_BITSET_ALL_NOT_SET = 9
ITERATOR_OVERLAPS = 10
ITERATOR_NEIGHBOR = 11
IPROTO_FEATURE_STREAMS = 0
IPROTO_FEATURE_TRANSACTIONS = 1
IPROTO_FEATURE_ERROR_EXTENSION = 2
IPROTO_FEATURE_WATCHERS = 3
IPROTO_FEATURE_PAGINATION = 4
IPROTO_FEATURE_SPACE_AND_INDEX_NAMES = 5
IPROTO_FEATURE_WATCH_ONCE = 6
# Default value for host.
DEFAULT_HOST = None
# Default value for port.
DEFAULT_PORT = None
# Default value for socket_fd.
DEFAULT_SOCKET_FD = None
# Default value for connection timeout (seconds)
CONNECTION_TIMEOUT = None
# Default value for socket timeout (seconds)
SOCKET_TIMEOUT = None
# Default maximum number of attempts to reconnect
RECONNECT_MAX_ATTEMPTS = 10
# Default delay between attempts to reconnect (seconds)
RECONNECT_DELAY = 0.1
# Default value for transport
DEFAULT_TRANSPORT = ""
# Value for SSL transport
SSL_TRANSPORT = "ssl"
# Default value for a path to SSL key file
DEFAULT_SSL_KEY_FILE = None
# Default value for a path to SSL certificate file
DEFAULT_SSL_CERT_FILE = None
# Default value for a path to SSL certificatea uthorities file
DEFAULT_SSL_CA_FILE = None
# Default value for list of SSL ciphers
DEFAULT_SSL_CIPHERS = None
# Default value for SSL key file password
DEFAULT_SSL_PASSWORD = None
# Default value for a path to file with SSL key file password
DEFAULT_SSL_PASSWORD_FILE = None
# Default cluster nodes list refresh interval (seconds)
CLUSTER_DISCOVERY_DELAY = 60
# Default cluster nodes state refresh interval (seconds)
POOL_REFRESH_DELAY = 1
# Default maximum number of attempts to reconnect for pool instance
POOL_INSTANCE_RECONNECT_MAX_ATTEMPTS = 0
# Default delay between attempts to reconnect (seconds)
POOL_INSTANCE_RECONNECT_DELAY = 0
# Tarantool master 970ea48 protocol version is 6
CONNECTOR_IPROTO_VERSION = 6
# List of connector-supported features
CONNECTOR_FEATURES = [IPROTO_FEATURE_ERROR_EXTENSION]
# Authenticate with CHAP-SHA1 (Tarantool CE and EE)
AUTH_TYPE_CHAP_SHA1 = "chap-sha1"
# Authenticate with PAP-SHA256 (Tarantool EE)
AUTH_TYPE_PAP_SHA256 = "pap-sha256"
# List of supported auth types.
AUTH_TYPES = [AUTH_TYPE_CHAP_SHA1, AUTH_TYPE_PAP_SHA256]