#include <rpc/server.h>
#include <rpc/util.h>
#include <shutdown.h>
#include <sync.h>
#include <util/strencodings.h>
#include <util/system.h>
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/split.hpp>
#include <boost/signals2/signal.hpp>
#include <cassert>
#include <memory>
#include <mutex>
#include <unordered_map>
Go to the source code of this file.
|
| static bool fRPCInWarmup | GUARDED_BY (g_rpc_warmup_mutex) = "RPC server started" |
| |
static std::map< std::string,
std::unique_ptr< RPCTimerBase >
> deadlineTimers | GUARDED_BY (g_deadline_timers_mutex) |
| |
| static bool | ExecuteCommand (const CRPCCommand &command, const JSONRPCRequest &request, UniValue &result, bool last_handler) |
| |
| static RPCHelpMan | help () |
| |
| static RPCHelpMan | stop () |
| |
| static RPCHelpMan | uptime () |
| |
| static RPCHelpMan | getrpcinfo () |
| |
| void | StartRPC () |
| |
| void | InterruptRPC () |
| |
| void | StopRPC () |
| |
| bool | IsRPCRunning () |
| | Query whether RPC is running. More...
|
| |
| void | RpcInterruptionPoint () |
| | Throw JSONRPCError if RPC is not running. More...
|
| |
| void | SetRPCWarmupStatus (const std::string &newStatus) |
| | Set the RPC warmup status. More...
|
| |
| void | SetRPCWarmupFinished () |
| |
| bool | RPCIsInWarmup (std::string *outStatus) |
| |
| bool | IsDeprecatedRPCEnabled (const std::string &method) |
| |
| static UniValue | JSONRPCExecOne (JSONRPCRequest jreq, const UniValue &req) |
| |
| std::string | JSONRPCExecBatch (const JSONRPCRequest &jreq, const UniValue &vReq) |
| |
| static JSONRPCRequest | transformNamedArguments (const JSONRPCRequest &in, const std::vector< std::string > &argNames) |
| | Process named arguments into a vector of positional arguments, based on the passed-in specification for the RPC call's arguments. More...
|
| |
| void | RPCSetTimerInterfaceIfUnset (RPCTimerInterface *iface) |
| | Set the factory function for timer, but only, if unset. More...
|
| |
| void | RPCSetTimerInterface (RPCTimerInterface *iface) |
| | Set the factory function for timers. More...
|
| |
| void | RPCUnsetTimerInterface (RPCTimerInterface *iface) |
| | Unset factory function for timers. More...
|
| |
| void | RPCRunLater (const std::string &name, std::function< void()> func, int64_t nSeconds) |
| | Run func nSeconds from now. More...
|
| |
| int | RPCSerializationFlags () |
| |
| static std::string rpcWarmupStatus GUARDED_BY |
( |
g_rpc_warmup_mutex |
| ) |
= "RPC server started" |
|
static |
| bool IsDeprecatedRPCEnabled |
( |
const std::string & |
method | ) |
|
Query whether RPC is running.
Definition at line 315 of file server.cpp.
| void RpcInterruptionPoint |
( |
| ) |
|
Throw JSONRPCError if RPC is not running.
Definition at line 320 of file server.cpp.
| bool RPCIsInWarmup |
( |
std::string * |
outStatus | ) |
|
| void RPCRunLater |
( |
const std::string & |
name, |
|
|
std::function< void()> |
func, |
|
|
int64_t |
nSeconds |
|
) |
| |
Run func nSeconds from now.
Overrides previous timer <name> (if any).
Definition at line 499 of file server.cpp.
| int RPCSerializationFlags |
( |
| ) |
|
Set the factory function for timers.
Definition at line 488 of file server.cpp.
Set the factory function for timer, but only, if unset.
Definition at line 482 of file server.cpp.
Unset factory function for timers.
Definition at line 493 of file server.cpp.
| void SetRPCWarmupFinished |
( |
| ) |
|
| void SetRPCWarmupStatus |
( |
const std::string & |
newStatus | ) |
|
Set the RPC warmup status.
When this is done, all RPC calls will error out immediately with RPC_IN_WARMUP.
Definition at line 325 of file server.cpp.
Process named arguments into a vector of positional arguments, based on the passed-in specification for the RPC call's arguments.
Definition at line 389 of file server.cpp.
| Mutex g_deadline_timers_mutex |
|
static |
| std::atomic<bool> g_rpc_running {false} |
|
static |
Initial value:=
{
{
"control",
"help", &
help, {
"command"} },
{
"control",
"stop", &
stop, {
"wait"} },
{
"control",
"uptime", &
uptime, {} },
}
static RPCHelpMan getrpcinfo()
static RPCHelpMan uptime()
Definition at line 246 of file server.cpp.