Classes | Typedefs | Enumerations | Functions
http_proxy_fixture.cc File Reference
#include "test/core/end2end/fixtures/http_proxy_fixture.h"
#include <limits.h>
#include <string.h>
#include "absl/strings/str_cat.h"
#include <grpc/grpc.h>
#include <grpc/slice_buffer.h>
#include <grpc/support/alloc.h>
#include <grpc/support/atm.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
#include "src/core/lib/address_utils/sockaddr_utils.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gprpp/host_port.h"
#include "src/core/lib/gprpp/memory.h"
#include "src/core/lib/gprpp/thd.h"
#include "src/core/lib/http/parser.h"
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/combiner.h"
#include "src/core/lib/iomgr/endpoint.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/pollset.h"
#include "src/core/lib/iomgr/pollset_set.h"
#include "src/core/lib/iomgr/resolve_address.h"
#include "src/core/lib/iomgr/sockaddr.h"
#include "src/core/lib/iomgr/tcp_client.h"
#include "src/core/lib/iomgr/tcp_server.h"
#include "src/core/lib/iomgr/timer.h"
#include "src/core/lib/resource_quota/api.h"
#include "src/core/lib/slice/b64.h"
#include "src/core/lib/slice/slice_internal.h"
#include "test/core/util/port.h"
Include dependency graph for http_proxy_fixture.cc:

Go to the source code of this file.

Classes

struct  grpc_end2end_http_proxy
 
struct  proxy_connection
 

Typedefs

typedef struct proxy_connection proxy_connection
 

Enumerations

enum  failure_type {
  SETUP_FAILED, CLIENT_READ_FAILED, CLIENT_WRITE_FAILED, SERVER_READ_FAILED,
  SERVER_WRITE_FAILED
}
 

Functions

static void destroy_pollset (void *arg, grpc_error_handle)
 
grpc_end2end_http_proxygrpc_end2end_http_proxy_create (const grpc_channel_args *args)
 
void grpc_end2end_http_proxy_destroy (grpc_end2end_http_proxy *proxy)
 
const char * grpc_end2end_http_proxy_get_proxy_name (grpc_end2end_http_proxy *proxy)
 
static void on_accept (void *arg, grpc_endpoint *endpoint, grpc_pollset *, grpc_tcp_server_acceptor *acceptor)
 
static void on_client_read_done (void *arg, grpc_error_handle error)
 
static void on_client_read_done_locked (void *arg, grpc_error_handle error)
 
static void on_client_write_done (void *arg, grpc_error_handle error)
 
static void on_client_write_done_locked (void *arg, grpc_error_handle error)
 
static void on_read_request_done (void *arg, grpc_error_handle error)
 
static void on_read_request_done_locked (void *arg, grpc_error_handle error)
 
static void on_server_connect_done (void *arg, grpc_error_handle error)
 
static void on_server_connect_done_locked (void *arg, grpc_error_handle error)
 
static void on_server_read_done (void *arg, grpc_error_handle error)
 
static void on_server_read_done_locked (void *arg, grpc_error_handle error)
 
static void on_server_write_done (void *arg, grpc_error_handle error)
 
static void on_server_write_done_locked (void *arg, grpc_error_handle error)
 
static void on_write_response_done (void *arg, grpc_error_handle error)
 
static void on_write_response_done_locked (void *arg, grpc_error_handle error)
 
static bool proxy_auth_header_matches (char *proxy_auth_header_val, char *expected_cred)
 
static void proxy_connection_failed (proxy_connection *conn, failure_type failure, const char *prefix, grpc_error_handle error)
 
static void proxy_connection_ref (proxy_connection *conn, const char *)
 
static void proxy_connection_unref (proxy_connection *conn, const char *)
 
static void thread_main (void *arg)
 

Typedef Documentation

◆ proxy_connection

Enumeration Type Documentation

◆ failure_type

Enumerator
SETUP_FAILED 
CLIENT_READ_FAILED 
CLIENT_WRITE_FAILED 
SERVER_READ_FAILED 
SERVER_WRITE_FAILED 

Definition at line 150 of file http_proxy_fixture.cc.

Function Documentation

◆ destroy_pollset()

static void destroy_pollset ( void *  arg,
grpc_error_handle   
)
static

Definition at line 657 of file http_proxy_fixture.cc.

◆ grpc_end2end_http_proxy_create()

grpc_end2end_http_proxy* grpc_end2end_http_proxy_create ( const grpc_channel_args args)

Definition at line 618 of file http_proxy_fixture.cc.

◆ grpc_end2end_http_proxy_destroy()

void grpc_end2end_http_proxy_destroy ( grpc_end2end_http_proxy proxy)

Definition at line 663 of file http_proxy_fixture.cc.

◆ grpc_end2end_http_proxy_get_proxy_name()

const char* grpc_end2end_http_proxy_get_proxy_name ( grpc_end2end_http_proxy proxy)

Definition at line 677 of file http_proxy_fixture.cc.

◆ on_accept()

static void on_accept ( void *  arg,
grpc_endpoint endpoint,
grpc_pollset ,
grpc_tcp_server_acceptor acceptor 
)
static

Definition at line 567 of file http_proxy_fixture.cc.

◆ on_client_read_done()

static void on_client_read_done ( void *  arg,
grpc_error_handle  error 
)
static

Definition at line 320 of file http_proxy_fixture.cc.

◆ on_client_read_done_locked()

static void on_client_read_done_locked ( void *  arg,
grpc_error_handle  error 
)
static

Definition at line 285 of file http_proxy_fixture.cc.

◆ on_client_write_done()

static void on_client_write_done ( void *  arg,
grpc_error_handle  error 
)
static

Definition at line 239 of file http_proxy_fixture.cc.

◆ on_client_write_done_locked()

static void on_client_write_done_locked ( void *  arg,
grpc_error_handle  error 
)
static

Definition at line 212 of file http_proxy_fixture.cc.

◆ on_read_request_done()

static void on_read_request_done ( void *  arg,
grpc_error_handle  error 
)
static

Definition at line 559 of file http_proxy_fixture.cc.

◆ on_read_request_done_locked()

static void on_read_request_done_locked ( void *  arg,
grpc_error_handle  error 
)
static

Definition at line 470 of file http_proxy_fixture.cc.

◆ on_server_connect_done()

static void on_server_connect_done ( void *  arg,
grpc_error_handle  error 
)
static

Definition at line 436 of file http_proxy_fixture.cc.

◆ on_server_connect_done_locked()

static void on_server_connect_done_locked ( void *  arg,
grpc_error_handle  error 
)
static

Definition at line 410 of file http_proxy_fixture.cc.

◆ on_server_read_done()

static void on_server_read_done ( void *  arg,
grpc_error_handle  error 
)
static

Definition at line 364 of file http_proxy_fixture.cc.

◆ on_server_read_done_locked()

static void on_server_read_done_locked ( void *  arg,
grpc_error_handle  error 
)
static

Definition at line 329 of file http_proxy_fixture.cc.

◆ on_server_write_done()

static void on_server_write_done ( void *  arg,
grpc_error_handle  error 
)
static

Definition at line 275 of file http_proxy_fixture.cc.

◆ on_server_write_done_locked()

static void on_server_write_done_locked ( void *  arg,
grpc_error_handle  error 
)
static

Definition at line 248 of file http_proxy_fixture.cc.

◆ on_write_response_done()

static void on_write_response_done ( void *  arg,
grpc_error_handle  error 
)
static

Definition at line 400 of file http_proxy_fixture.cc.

◆ on_write_response_done_locked()

static void on_write_response_done_locked ( void *  arg,
grpc_error_handle  error 
)
static

Definition at line 372 of file http_proxy_fixture.cc.

◆ proxy_auth_header_matches()

static bool proxy_auth_header_matches ( char *  proxy_auth_header_val,
char *  expected_cred 
)
static

Parses the proxy auth header value to check if it matches :- Basic <base64_encoded_expected_cred> Returns true if it matches, false otherwise

Definition at line 449 of file http_proxy_fixture.cc.

◆ proxy_connection_failed()

static void proxy_connection_failed ( proxy_connection conn,
failure_type  failure,
const char *  prefix,
grpc_error_handle  error 
)
static

Definition at line 174 of file http_proxy_fixture.cc.

◆ proxy_connection_ref()

static void proxy_connection_ref ( proxy_connection conn,
const char *   
)
static

Definition at line 121 of file http_proxy_fixture.cc.

◆ proxy_connection_unref()

static void proxy_connection_unref ( proxy_connection conn,
const char *   
)
static

Definition at line 127 of file http_proxy_fixture.cc.

◆ thread_main()

static void thread_main ( void *  arg)
static

Definition at line 602 of file http_proxy_fixture.cc.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:20