CallContext¶
#include <vgi_rpc/call_context.h>
Per-request context passed to method handlers and stream processors. Provides the server/request IDs and a log sink for emitting client-visible log messages.
Methods¶
client_log¶
void client_log(LogLevel level, std::string_view message,
const nlohmann::json& extra = {});
void client_log(const Message& msg);
Emit a log message to the client. The message is sent as an in-band LOG batch in the response stream. The extra parameter allows attaching structured JSON data to the log entry.
server_id¶
request_id¶
log_sink¶
Access the underlying log sink directly.