* deprecate old unused lokid rpc options

* use lokimq::address in config and in lokid rpc
* bump lokimq submodule
pull/1306/head
Jeff Becker 4 years ago
parent 80919a3b76
commit a9109aa91b
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

2
external/loki-mq vendored

@ -1 +1 @@
Subproject commit 8a56b18cc64b52644e7799b1ed9cdb7ddb63ee83
Subproject commit 07b31bd8a1b39a7de7913b91aab7b8e1e12e928b

@ -431,14 +431,11 @@ namespace llarp
conf.defineOption<bool>(
"lokid", "enabled", false, DefaultWhitelistRouters, AssignmentAcceptor(whitelistRouters));
conf.defineOption<std::string>(
"lokid", "jsonrpc", false, DefaultLokidRPCAddr, AssignmentAcceptor(lokidRPCAddr));
auto setRPC = [this](std::string arg) { lokidRPCAddr = lokimq::address(arg); };
conf.defineOption<std::string>(
"lokid", "username", false, "", AssignmentAcceptor(lokidRPCUser));
conf.defineOption<std::string>("lokid", "jsonrpc", false, DefaultLokidRPCAddr, setRPC);
conf.defineOption<std::string>(
"lokid", "password", false, "", AssignmentAcceptor(lokidRPCPassword));
conf.defineOption<std::string>("lokid", "rpc", false, DefaultLokidRPCAddr, setRPC);
}
void
@ -597,6 +594,9 @@ namespace llarp
addIgnoreOption("metrics", "json-metrics-path");
addIgnoreOption("network", "enabled");
addIgnoreOption("lokid", "username");
addIgnoreOption("lokid", "password");
}
void
@ -966,9 +966,9 @@ namespace llarp
def.addOptionComments(
"lokid",
"jsonrpc",
"rpc",
{
"Host and port of running lokid that we should talk to.",
"Host and port of running lokid's rpc that we should talk to.",
});
// TODO: doesn't appear to be used in the codebase

@ -22,6 +22,8 @@
#include <vector>
#include <unordered_set>
#include <lokimq/address.h>
struct llarp_config;
namespace llarp
@ -149,9 +151,7 @@ namespace llarp
bool usingSNSeed = false;
bool whitelistRouters = false;
fs::path ident_keyfile;
std::string lokidRPCAddr;
std::string lokidRPCUser;
std::string lokidRPCPassword;
lokimq::address lokidRPCAddr;
void
defineConfigOptions(ConfigDefinition& conf, const ConfigGenParameters& params);

@ -267,8 +267,6 @@ namespace llarp
std::shared_ptr<rpc::LokidRpcClient> m_lokidRpcClient;
lokimq::address lokidRPCAddr;
std::string lokidRPCUser;
std::string lokidRPCPassword;
Profiling _routerProfiling;
std::string routerProfilesFile = "profiles.dat";

@ -43,7 +43,7 @@ namespace llarp
{
LogInfo("connecting to lokid via LMQ at ", url);
m_lokiMQ->connect_remote(
url.zmq_address(),
url,
[self = shared_from_this()](lokimq::ConnectionID c) {
self->m_Connection = std::move(c);
self->Connected();

Loading…
Cancel
Save