Skip to content
Snippets Groups Projects
Commit 3fc40001 authored by Vladislav Shpilevoy's avatar Vladislav Shpilevoy
Browse files

swim: drop swim_info() function

Swim_info() was a function to dump SWIM instance info to a Lua
table without explicit usage of Lua. But now all the info can be
taken from 1) self member and member API, 2) cached cfg options
as a Lua table in a forthcoming Lua API - this is how
box.cfg.<index> works.
parent 42b7f6d8
No related branches found
No related tags found
No related merge requests found
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
#include "uri/uri.h" #include "uri/uri.h"
#include "fiber.h" #include "fiber.h"
#include "msgpuck.h" #include "msgpuck.h"
#include "info/info.h"
#include "assoc.h" #include "assoc.h"
#include "sio.h" #include "sio.h"
#define HEAP_FORWARD_DECLARATION #define HEAP_FORWARD_DECLARATION
...@@ -1911,25 +1910,6 @@ swim_broadcast(struct swim *swim, int port) ...@@ -1911,25 +1910,6 @@ swim_broadcast(struct swim *swim, int port)
return 0; return 0;
} }
void
swim_info(struct swim *swim, struct info_handler *info)
{
info_begin(info);
for (mh_int_t node = mh_first(swim->members),
end = mh_end(swim->members); node != end;
node = mh_next(swim->members, node)) {
struct swim_member *m =
*mh_swim_table_node(swim->members, node);
info_table_begin(info, swim_inaddr_str(&m->addr));
info_append_str(info, "status",
swim_member_status_strs[m->status]);
info_append_str(info, "uuid", tt_uuid_str(&m->uuid));
info_append_int(info, "incarnation", (int64_t) m->incarnation);
info_table_end(info);
}
info_end(info);
}
int int
swim_size(const struct swim *swim) swim_size(const struct swim *swim)
{ {
......
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
extern "C" { extern "C" {
#endif #endif
struct info_handler;
struct swim; struct swim;
struct tt_uuid; struct tt_uuid;
struct swim_iterator; struct swim_iterator;
...@@ -153,10 +152,6 @@ swim_probe_member(struct swim *swim, const char *uri); ...@@ -153,10 +152,6 @@ swim_probe_member(struct swim *swim, const char *uri);
int int
swim_broadcast(struct swim *swim, int port); swim_broadcast(struct swim *swim, int port);
/** Dump member statuses into @a info. */
void
swim_info(struct swim *swim, struct info_handler *info);
/** Get SWIM member table size. */ /** Get SWIM member table size. */
int int
swim_size(const struct swim *swim); swim_size(const struct swim *swim);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment