-
Notifications
You must be signed in to change notification settings - Fork 0
/
type.go
116 lines (113 loc) · 3.92 KB
/
type.go
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
// Code generated by generate.sh; DO NOT EDIT.
package iproto
// IPROTO type constants, generated from
// tarantool/src/box/iproto_constants.h
type Type int
const (
// Acknowledgement that request or command is successful
IPROTO_OK Type = 0
// SELECT request
IPROTO_SELECT Type = 1
// INSERT request
IPROTO_INSERT Type = 2
// REPLACE request
IPROTO_REPLACE Type = 3
// UPDATE request
IPROTO_UPDATE Type = 4
// DELETE request
IPROTO_DELETE Type = 5
// CALL request - wraps result into [tuple, tuple, ...] format
IPROTO_CALL_16 Type = 6
// AUTH request
IPROTO_AUTH Type = 7
// EVAL request
IPROTO_EVAL Type = 8
// UPSERT request
IPROTO_UPSERT Type = 9
// CALL request - returns arbitrary MessagePack
IPROTO_CALL Type = 10
// Execute an SQL statement.
IPROTO_EXECUTE Type = 11
// No operation. Treated as DML, used to bump LSN.
IPROTO_NOP Type = 12
// Prepare SQL statement.
IPROTO_PREPARE Type = 13
// Begin transaction
IPROTO_BEGIN Type = 14
// Commit transaction
IPROTO_COMMIT Type = 15
// Rollback transaction
IPROTO_ROLLBACK Type = 16
// INSERT Arrow request.
IPROTO_INSERT_ARROW Type = 17
IPROTO_RAFT Type = 30
// PROMOTE request.
IPROTO_RAFT_PROMOTE Type = 31
// DEMOTE request.
IPROTO_RAFT_DEMOTE Type = 32
// A confirmation message for synchronous transactions.
IPROTO_RAFT_CONFIRM Type = 40
// A rollback message for synchronous transactions.
IPROTO_RAFT_ROLLBACK Type = 41
// PING request
IPROTO_PING Type = 64
// Replication JOIN command
IPROTO_JOIN Type = 65
// Replication SUBSCRIBE command
IPROTO_SUBSCRIBE Type = 66
// DEPRECATED: use IPROTO_VOTE instead
IPROTO_VOTE_DEPRECATED Type = 67
// Vote request command for master election
IPROTO_VOTE Type = 68
// Anonymous replication FETCH SNAPSHOT.
IPROTO_FETCH_SNAPSHOT Type = 69
// REGISTER request to leave anonymous replication.
IPROTO_REGISTER Type = 70
IPROTO_JOIN_META Type = 71
IPROTO_JOIN_SNAPSHOT Type = 72
// Protocol features request.
IPROTO_ID Type = 73
// The following three request types are used by the remote watcher
// protocol (box.watch over network), which operates as follows:
//
// 1. The client sends an IPROTO_WATCH packet to subscribe to changes
// of a specified key defined on the server.
// 2. The server sends an IPROTO_EVENT packet to the subscribed client
// with the key name and its current value unconditionally after
// registration and then every time the key value is updated
// provided the last notification was acknowledged (see below).
// 3. Upon receiving a notification, the client sends an IPROTO_WATCH
// packet to acknowledge the notification.
// 4. When the client doesn't want to receive any more notifications,
// it unsubscribes by sending an IPROTO_UNWATCH packet.
//
// All the three request types are fully asynchronous - a receiving end
// doesn't send a packet in reply to any of them. Still, the server
// sends the same sync number in an IPROTO_EVENT packet as the one sent
// by the client in the last corresponding IPROTO_WATCH request.
IPROTO_WATCH Type = 74
IPROTO_UNWATCH Type = 75
IPROTO_EVENT Type = 76
// Synchronous request to fetch the data that is currently attached to
// a notification key without subscribing to changes.
IPROTO_WATCH_ONCE Type = 77
// The following three requests are reserved for vinyl types.
//
// VY_INDEX_RUN_INFO = 100
// VY_INDEX_PAGE_INFO = 101
// VY_RUN_ROW_INDEX = 102
// Non-final response type.
IPROTO_CHUNK Type = 128
// Error codes = (IPROTO_TYPE_ERROR | ER_XXX from errcode.h)
IPROTO_TYPE_ERROR Type = 1 << 15
// Used for overriding the unknown request handler
IPROTO_UNKNOWN Type = -1
// The maximum typecode used for box.stat()
IPROTO_TYPE_STAT_MAX Type = IPROTO_INSERT_ARROW + 1
// Vinyl run info stored in .index file
VY_INDEX_RUN_INFO Type = 100
// Vinyl page info stored in .index file
VY_INDEX_PAGE_INFO Type = 101
// Vinyl row index stored in .run file
VY_RUN_ROW_INDEX Type = 102
)