MCPcopy Create free account
hub / github.com/apache/trafficserver / invoke_method

Method invoke_method

src/traffic_ctl/CtrlCommands.cc:558–575  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

556}
557
558void
559DirectRPCCommand::invoke_method()
560{
561 shared::rpc::ClientRequest request;
562 if (auto method = get_parsed_arguments()->get(INVOKE_STR); method) {
563 request.method = method.value();
564 // We build up the parameter content if passed.
565 if (auto params = get_parsed_arguments()->get(PARAMS_STR); params) {
566 std::ostringstream ss;
567 for (auto &&param : params) {
568 ss << param;
569 ss << '\n';
570 }
571 request.params = YAML::Load(ss.str()); // let if fail if this is bad.
572 }
573 _printer->write_output(invoke_rpc(request));
574 }
575}
576
577//------------------------------------------------------------------------------------------------------------------------------------
578ServerCommand::ServerCommand(ts::Arguments *args) : CtrlCommand(args)

Callers

nothing calls this directly

Calls 5

LoadFunction · 0.85
getMethod · 0.45
valueMethod · 0.45
strMethod · 0.45
write_outputMethod · 0.45

Tested by

no test coverage detected