Go to the documentation of this file.
21 #include <grpc/byte_buffer.h>
29 #include "src/core/ext/filters/load_reporting/server_load_reporting_plugin.h"
56 const char* test_name,
62 f =
config.create_fixture(client_args, server_args);
63 config.init_server(&
f, server_args);
64 config.init_client(&
f, client_args);
85 if (!
f->server)
return;
97 if (!
f->client)
return;
113 const char*
method_name,
const char* request_msg,
const char* response_msg,
141 nullptr, deadline,
nullptr);
265 const grpc_load_reporting_call_data*
call_data);
280 const char* request_msg =
"the msg from the client";
281 const char* response_msg =
"... and the response from the server";
286 initial_lr_metadata.
key = GRPC_MDSTR_LB_TOKEN;
291 trailing_lr_metadata.
key = GRPC_MDSTR_LB_COST_BIN;
297 response_msg, &initial_lr_metadata,
298 &trailing_lr_metadata);
static void end_test(grpc_end2end_test_fixture *f)
GPRAPI void grpc_slice_unref(grpc_slice s)
struct grpc_byte_buffer * send_message
GRPCAPI void grpc_call_details_destroy(grpc_call_details *details)
GRPCAPI void grpc_call_details_init(grpc_call_details *details)
grpc_metadata_array * trailing_metadata
gpr_timespec grpc_timeout_seconds_to_deadline(int64_t time_s)
grpc_status_code * status
GRPCAPI grpc_byte_buffer * grpc_raw_byte_buffer_create(grpc_slice *slices, size_t nslices)
return memset(p, 0, total)
struct connected_channel_call_data call_data
struct grpc_op::grpc_op_data::grpc_op_send_initial_metadata send_initial_metadata
grpc_status_code call_final_status
static gpr_timespec n_seconds_from_now(int n)
void load_reporting_hook_pre_init(void)
static void * tag(intptr_t t)
struct grpc_op::grpc_op_data::grpc_op_recv_message recv_message
union grpc_op::grpc_op_data data
GRPCAPI void grpc_metadata_array_destroy(grpc_metadata_array *array)
struct grpc_byte_buffer ** recv_message
GRPCAPI grpc_call_error grpc_server_request_call(grpc_server *server, grpc_call **call, grpc_call_details *details, grpc_metadata_array *request_metadata, grpc_completion_queue *cq_bound_to_call, grpc_completion_queue *cq_for_notification, void *tag_new)
static grpc_metadata_array trailing_metadata_recv
@ GRPC_OP_RECV_INITIAL_METADATA
@ GRPC_OP_SEND_STATUS_FROM_SERVER
GRPCAPI void grpc_call_unref(grpc_call *call)
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, const char *test_name, grpc_channel_args *client_args, grpc_channel_args *server_args)
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format,...) GPR_PRINT_FORMAT_CHECK(4
void cq_verifier_destroy(cq_verifier *v)
struct grpc_call grpc_call
static grpc_byte_buffer * response_payload_recv
unsigned __int64 uint64_t
void grpc_channel_args_destroy(grpc_channel_args *a)
GPRAPI grpc_slice grpc_slice_from_static_string(const char *source)
cq_verifier * cq_verifier_create(grpc_completion_queue *cq)
grpc_metadata * trailing_metadata
static grpc_metadata_array request_metadata_recv
static void request_response_with_payload(grpc_end2end_test_config config, grpc_end2end_test_fixture f, const char *method_name, const char *request_msg, const char *response_msg, grpc_metadata *initial_lr_metadata, grpc_metadata *trailing_lr_metadata)
GRPCAPI void grpc_server_destroy(grpc_server *server)
#define CQ_EXPECT_COMPLETION(v, tag, success)
void load_reporting_hook(grpc_end2end_test_config config)
grpc_slice * status_details
static void drain_cq(grpc_completion_queue *cq)
static grpc_slice details
GRPCAPI grpc_call * grpc_channel_create_call(grpc_channel *channel, grpc_call *parent_call, uint32_t propagation_mask, grpc_completion_queue *completion_queue, grpc_slice method, const grpc_slice *host, gpr_timespec deadline, void *reserved)
struct grpc_op::grpc_op_data::grpc_op_recv_close_on_server recv_close_on_server
#define GRPC_PROPAGATE_DEFAULTS
struct grpc_op::grpc_op_data::grpc_op_send_status_from_server send_status_from_server
GRPCAPI void grpc_completion_queue_destroy(grpc_completion_queue *cq)
@ GRPC_OP_SEND_INITIAL_METADATA
grpc_core::ExecCtx exec_ctx
struct grpc_op::grpc_op_data::grpc_op_send_message send_message
void(* g_load_reporting_fn)(const grpc_load_reporting_call_data *call_data)
struct grpc_op::grpc_op_data::grpc_op_recv_status_on_client recv_status_on_client
size_t trailing_metadata_count
GRPCAPI void grpc_server_shutdown_and_notify(grpc_server *server, grpc_completion_queue *cq, void *tag)
GRPCAPI void grpc_byte_buffer_destroy(grpc_byte_buffer *bb)
static gpr_timespec five_seconds_from_now(void)
GRPCAPI grpc_event grpc_completion_queue_next(grpc_completion_queue *cq, gpr_timespec deadline, void *reserved)
void cq_verify(cq_verifier *v, int timeout_sec)
GRPCAPI void grpc_completion_queue_shutdown(grpc_completion_queue *cq)
GRPCAPI void grpc_channel_destroy(grpc_channel *channel)
@ GRPC_OP_RECV_CLOSE_ON_SERVER
static void shutdown_client(grpc_end2end_test_fixture *f)
static void shutdown_server(grpc_end2end_test_fixture *f)
struct grpc_op::grpc_op_data::grpc_op_recv_initial_metadata recv_initial_metadata
grpc_slice * status_details
grpc_completion_type type
@ GRPC_OP_RECV_STATUS_ON_CLIENT
absl::string_view method_name
static grpc_metadata_array initial_metadata_recv
GRPCAPI grpc_call_error grpc_call_start_batch(grpc_call *call, const grpc_op *ops, size_t nops, void *tag, void *reserved)
static grpc_completion_queue * cq
grpc_channel_args * grpc_channel_args_copy_and_add(const grpc_channel_args *src, const grpc_arg *to_add, size_t num_to_add)
@ GRPC_OP_SEND_CLOSE_FROM_CLIENT
static void test_load_reporting_hook(grpc_end2end_test_config config)
static grpc_call_details call_details
GRPCAPI void grpc_metadata_array_init(grpc_metadata_array *array)
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:00:29