File tree Expand file tree Collapse file tree 2 files changed +18
-18
lines changed
Expand file tree Collapse file tree 2 files changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -22,3 +22,21 @@ func By(conn tarantool.Doer) Box {
2222 conn : conn , // Assigns the provided Tarantool connection.
2323 }
2424}
25+
26+ // Info retrieves the current information of the Tarantool instance.
27+ // It calls the "box.info" function and parses the result into the Info structure.
28+ func (b * box ) Info () (Info , error ) {
29+ var infoResp InfoResponse
30+
31+ // Call "box.info" to get instance information from Tarantool.
32+ fut := b .conn .Do (NewInfoRequest ())
33+
34+ // Parse the result into the Info structure.
35+ err := fut .GetTyped (& infoResp )
36+ if err != nil {
37+ return Info {}, err
38+ }
39+
40+ // Return the parsed info and any potential error.
41+ return infoResp .Info , err
42+ }
Original file line number Diff line number Diff line change @@ -56,24 +56,6 @@ func (ir *InfoResponse) DecodeMsgpack(d *msgpack.Decoder) error {
5656 return nil
5757}
5858
59- // Info retrieves the current information of the Tarantool instance.
60- // It calls the "box.info" function and parses the result into the Info structure.
61- func (b * box ) Info () (Info , error ) {
62- var infoResp InfoResponse
63-
64- // Call "box.info" to get instance information from Tarantool.
65- fut := b .conn .Do (NewInfoRequest ())
66-
67- // Parse the result into the Info structure.
68- err := fut .GetTyped (& infoResp )
69- if err != nil {
70- return Info {}, err
71- }
72-
73- // Return the parsed info and any potential error.
74- return infoResp .Info , err
75- }
76-
7759// InfoRequest represents a request to retrieve information about the Tarantool instance.
7860// It implements the tarantool.Request interface.
7961type InfoRequest struct {
You can’t perform that action at this time.
0 commit comments