@@ -26,6 +26,38 @@ type Info struct {
26
26
Status string `msgpack:"status"`
27
27
// LSN - Log sequence number of the instance.
28
28
LSN uint64 `msgpack:"lsn"`
29
+ // Replication - replication status
30
+ Replication map [int ]Replication `msgpack:"replication,omitempty"`
31
+ }
32
+
33
+ // Replication section of box.info() is a table with statistics for all instances
34
+ // in the replica set that the current instance belongs to.
35
+ type Replication struct {
36
+ // The node ID (nullable).
37
+ ID * int `msgpack:"id"`
38
+ // UUID - Unique identifier of the instance.
39
+ UUID string `msgpack:"uuid"`
40
+ // LSN - Log sequence number of the instance.
41
+ LSN uint64 `msgpack:"lsn"`
42
+ // Upstream - information about upstream.
43
+ Upstream Stream `msgpack:"upstream,omitempty"`
44
+ // Downstream - information about downstream.
45
+ Downstream Stream `msgpack:"downstream,omitempty"`
46
+ }
47
+
48
+ // Stream represents detailed information about stream.
49
+ type Stream struct {
50
+ // Status is replication status of the connection with the instance.
51
+ Status string `msgpack:"status"`
52
+ // Idle is the time (in seconds) since the last event was received.
53
+ Idle float64 `msgpack:"idle"`
54
+ // Lag is the time difference between the local time of instance n, recorded when the event was received,
55
+ // and the local time at another master recorded when the event was written to the write-ahead log on that master.
56
+ Lag float64 `msgpack:"lag"`
57
+ // Contains instance n’s URI.
58
+ Peer string `msgpack:"peer,omitempty"`
59
+ // Contains the vector clock, which is a table of ‘id, lsn’ pairs.
60
+ VClock map [int ]uint64 `msgpack:"vclock,omitempty"`
29
61
}
30
62
31
63
// InfoResponse represents the response structure
0 commit comments