trs/tests/main.cpp
2024-07-12 11:47:50 +03:00

37 lines
804 B
C++

#include "trs/trs.hpp"
namespace worckspaces
{
namespace json_data
{
inline auto healthcheck = R"(
{
"key": "value"
}
)"_json;
}
inline void inspector(trs::transaction& tr)
{
trs::helpers::json_compare(tr, json_data::healthcheck);
}
inline void provider(trs::transaction& tr)
{
hack::log()("provider", tr.m_data.m_payload);
tr.m_data.m_result["status"] = "ok";
tr.m_data.m_result["result"] = "super ok";
}
}
auto main(int argc, char* args[]) -> int
{
trs::client cli {"localhost:5000", "token_auth"};
cli.notify("/","test", "test message");
// trs::server srv;
// srv.init("test service", "app_connection", "log_connection");
// srv.registration("healthcheck", worckspaces::inspector, worckspaces::provider);
// srv.run();
}