Classes | Typedefs | Enumerations | Functions | Variables
rb_channel.c File Reference
#include <ruby/ruby.h>
#include "rb_channel.h"
#include <ruby/thread.h>
#include "rb_byte_buffer.h"
#include "rb_call.h"
#include "rb_channel_args.h"
#include "rb_channel_credentials.h"
#include "rb_completion_queue.h"
#include "rb_grpc.h"
#include "rb_grpc_imports.generated.h"
#include "rb_server.h"
#include "rb_xds_channel_credentials.h"
#include <grpc/grpc.h>
#include <grpc/grpc_security.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/time.h>
Include dependency graph for rb_channel.c:

Go to the source code of this file.

Classes

struct  bg_watched_channel
 
struct  channel_init_try_register_stack
 
struct  get_state_stack
 
struct  grpc_rb_channel
 
struct  watch_state_op
 
struct  watch_state_stack
 

Typedefs

typedef struct bg_watched_channel bg_watched_channel
 
typedef struct channel_init_try_register_stack channel_init_try_register_stack
 
typedef struct get_state_stack get_state_stack
 
typedef struct grpc_rb_channel grpc_rb_channel
 
typedef struct watch_state_op watch_state_op
 
typedef struct watch_state_stack watch_state_stack
 

Enumerations

enum  watch_state_op_type { CONTINUOUS_WATCH, WATCH_STATE_API }
 

Functions

static bg_watched_channelbg_watched_channel_list_create_and_add (grpc_channel *channel)
 
static void bg_watched_channel_list_free_and_remove (bg_watched_channel *bg)
 
static int bg_watched_channel_list_lookup (bg_watched_channel *bg)
 
static void * channel_init_try_register_connection_polling_without_gil (void *arg)
 
static void * channel_safe_destroy_without_gil (void *arg)
 
static void * get_state_without_gil (void *arg)
 
static VALUE grpc_rb_channel_alloc (VALUE cls)
 
static VALUE grpc_rb_channel_create_call (VALUE self, VALUE parent, VALUE mask, VALUE method, VALUE host, VALUE deadline)
 
static VALUE grpc_rb_channel_destroy (VALUE self)
 
static void grpc_rb_channel_free (void *p)
 
static void grpc_rb_channel_free_internal (void *p)
 
static VALUE grpc_rb_channel_get_connectivity_state (int argc, VALUE *argv, VALUE self)
 
static VALUE grpc_rb_channel_get_target (VALUE self)
 
static VALUE grpc_rb_channel_init (int argc, VALUE *argv, VALUE self)
 
static void grpc_rb_channel_mark (void *p)
 
void grpc_rb_channel_polling_thread_start ()
 
static void grpc_rb_channel_safe_destroy (bg_watched_channel *bg)
 
static void grpc_rb_channel_try_register_connection_polling (bg_watched_channel *bg)
 
static void grpc_rb_channel_watch_connection_state_op_complete (watch_state_op *op, int success)
 
static VALUE grpc_rb_channel_watch_connectivity_state (VALUE self, VALUE last_state, VALUE deadline)
 
grpc_channelgrpc_rb_get_wrapped_channel (VALUE v)
 
void Init_grpc_channel ()
 
static void Init_grpc_connectivity_states ()
 
static void Init_grpc_propagate_masks ()
 
static VALUE run_poll_channels_loop (VALUE arg)
 
static void * run_poll_channels_loop_no_gil (void *arg)
 
static void run_poll_channels_loop_unblocking_func (void *arg)
 
static void * set_abort_channel_polling_without_gil (void *arg)
 
static void wait_for_watch_state_op_complete_unblocking_func (void *arg)
 
static void * wait_for_watch_state_op_complete_without_gvl (void *arg)
 
static void * wait_until_channel_polling_thread_started_no_gil (void *)
 
static void wait_until_channel_polling_thread_started_unblocking_func (void *)
 

Variables

static int abort_channel_polling = 0
 
static bg_watched_channelbg_watched_channel_list_head = NULL
 
static grpc_completion_queuechannel_polling_cq
 
static int channel_polling_thread_started = 0
 
static gpr_cv global_connection_polling_cv
 
static gpr_mu global_connection_polling_mu
 
static rb_data_type_t grpc_channel_data_type
 
static VALUE grpc_rb_cChannel = Qnil
 
static VALUE grpc_rb_cChannelArgs
 
static ID id_channel
 
static VALUE id_insecure_channel
 
static ID id_target
 

Typedef Documentation

◆ bg_watched_channel

◆ channel_init_try_register_stack

◆ get_state_stack

◆ grpc_rb_channel

◆ watch_state_op

◆ watch_state_stack

Enumeration Type Documentation

◆ watch_state_op_type

Enumerator
CONTINUOUS_WATCH 
WATCH_STATE_API 

Definition at line 76 of file rb_channel.c.

Function Documentation

◆ bg_watched_channel_list_create_and_add()

static bg_watched_channel * bg_watched_channel_list_create_and_add ( grpc_channel channel)
static

Definition at line 529 of file rb_channel.c.

◆ bg_watched_channel_list_free_and_remove()

static void bg_watched_channel_list_free_and_remove ( bg_watched_channel bg)
static

Definition at line 541 of file rb_channel.c.

◆ bg_watched_channel_list_lookup()

static int bg_watched_channel_list_lookup ( bg_watched_channel bg)
static

Definition at line 515 of file rb_channel.c.

◆ channel_init_try_register_connection_polling_without_gil()

static void * channel_init_try_register_connection_polling_without_gil ( void *  arg)
static

Definition at line 566 of file rb_channel.c.

◆ channel_safe_destroy_without_gil()

static void* channel_safe_destroy_without_gil ( void *  arg)
static

Definition at line 144 of file rb_channel.c.

◆ get_state_without_gil()

static void* get_state_without_gil ( void *  arg)
static

Definition at line 288 of file rb_channel.c.

◆ grpc_rb_channel_alloc()

static VALUE grpc_rb_channel_alloc ( VALUE  cls)
static

Definition at line 197 of file rb_channel.c.

◆ grpc_rb_channel_create_call()

static VALUE grpc_rb_channel_create_call ( VALUE  self,
VALUE  parent,
VALUE  mask,
VALUE  method,
VALUE  host,
VALUE  deadline 
)
static

Definition at line 423 of file rb_channel.c.

◆ grpc_rb_channel_destroy()

static VALUE grpc_rb_channel_destroy ( VALUE  self)
static

Definition at line 487 of file rb_channel.c.

◆ grpc_rb_channel_free()

static void grpc_rb_channel_free ( void *  p)
static

Definition at line 167 of file rb_channel.c.

◆ grpc_rb_channel_free_internal()

static void grpc_rb_channel_free_internal ( void *  p)
static

Definition at line 149 of file rb_channel.c.

◆ grpc_rb_channel_get_connectivity_state()

static VALUE grpc_rb_channel_get_connectivity_state ( int  argc,
VALUE *  argv,
VALUE  self 
)
static

Definition at line 313 of file rb_channel.c.

◆ grpc_rb_channel_get_target()

static VALUE grpc_rb_channel_get_target ( VALUE  self)
static

Definition at line 501 of file rb_channel.c.

◆ grpc_rb_channel_init()

static VALUE grpc_rb_channel_init ( int  argc,
VALUE *  argv,
VALUE  self 
)
static

Definition at line 213 of file rb_channel.c.

◆ grpc_rb_channel_mark()

static void grpc_rb_channel_mark ( void *  p)
static

Definition at line 173 of file rb_channel.c.

◆ grpc_rb_channel_polling_thread_start()

void grpc_rb_channel_polling_thread_start ( )

Definition at line 753 of file rb_channel.c.

◆ grpc_rb_channel_safe_destroy()

static void grpc_rb_channel_safe_destroy ( bg_watched_channel bg)
static

Definition at line 130 of file rb_channel.c.

◆ grpc_rb_channel_try_register_connection_polling()

static void grpc_rb_channel_try_register_connection_polling ( bg_watched_channel bg)
static

Definition at line 580 of file rb_channel.c.

◆ grpc_rb_channel_watch_connection_state_op_complete()

static void grpc_rb_channel_watch_connection_state_op_complete ( watch_state_op op,
int  success 
)
static

Definition at line 120 of file rb_channel.c.

◆ grpc_rb_channel_watch_connectivity_state()

static VALUE grpc_rb_channel_watch_connectivity_state ( VALUE  self,
VALUE  last_state,
VALUE  deadline 
)
static

Definition at line 388 of file rb_channel.c.

◆ grpc_rb_get_wrapped_channel()

grpc_channel* grpc_rb_get_wrapped_channel ( VALUE  v)

Definition at line 845 of file rb_channel.c.

◆ Init_grpc_channel()

void Init_grpc_channel ( )

Definition at line 805 of file rb_channel.c.

◆ Init_grpc_connectivity_states()

static void Init_grpc_connectivity_states ( )
static

Definition at line 789 of file rb_channel.c.

◆ Init_grpc_propagate_masks()

static void Init_grpc_propagate_masks ( )
static

Definition at line 773 of file rb_channel.c.

◆ run_poll_channels_loop()

static VALUE run_poll_channels_loop ( VALUE  arg)
static

Definition at line 697 of file rb_channel.c.

◆ run_poll_channels_loop_no_gil()

static void* run_poll_channels_loop_no_gil ( void *  arg)
static

Definition at line 619 of file rb_channel.c.

◆ run_poll_channels_loop_unblocking_func()

static void run_poll_channels_loop_unblocking_func ( void *  arg)
static

Definition at line 663 of file rb_channel.c.

◆ set_abort_channel_polling_without_gil()

static void* set_abort_channel_polling_without_gil ( void *  arg)
static

Definition at line 734 of file rb_channel.c.

◆ wait_for_watch_state_op_complete_unblocking_func()

static void wait_for_watch_state_op_complete_unblocking_func ( void *  arg)
static

Definition at line 371 of file rb_channel.c.

◆ wait_for_watch_state_op_complete_without_gvl()

static void* wait_for_watch_state_op_complete_without_gvl ( void *  arg)
static

Definition at line 341 of file rb_channel.c.

◆ wait_until_channel_polling_thread_started_no_gil()

static void * wait_until_channel_polling_thread_started_no_gil ( void *  arg)
static

Definition at line 709 of file rb_channel.c.

◆ wait_until_channel_polling_thread_started_unblocking_func()

static void wait_until_channel_polling_thread_started_unblocking_func ( void *  arg)
static

Definition at line 723 of file rb_channel.c.

Variable Documentation

◆ abort_channel_polling

int abort_channel_polling = 0
static

Definition at line 110 of file rb_channel.c.

◆ bg_watched_channel_list_head

bg_watched_channel* bg_watched_channel_list_head = NULL
static

Definition at line 93 of file rb_channel.c.

◆ channel_polling_cq

grpc_completion_queue* channel_polling_cq
static

Definition at line 107 of file rb_channel.c.

◆ channel_polling_thread_started

int channel_polling_thread_started = 0
static

Definition at line 111 of file rb_channel.c.

◆ global_connection_polling_cv

gpr_cv global_connection_polling_cv
static

Definition at line 109 of file rb_channel.c.

◆ global_connection_polling_mu

gpr_mu global_connection_polling_mu
static

Definition at line 108 of file rb_channel.c.

◆ grpc_channel_data_type

rb_data_type_t grpc_channel_data_type
static
Initial value:
= {"grpc_channel",
{NULL, NULL}},
NULL,
NULL,
}

Definition at line 184 of file rb_channel.c.

◆ grpc_rb_cChannel

VALUE grpc_rb_cChannel = Qnil
static

Definition at line 54 of file rb_channel.c.

◆ grpc_rb_cChannelArgs

VALUE grpc_rb_cChannelArgs
static

Definition at line 57 of file rb_channel.c.

◆ id_channel

ID id_channel
static

Definition at line 43 of file rb_channel.c.

◆ id_insecure_channel

VALUE id_insecure_channel
static

Definition at line 51 of file rb_channel.c.

◆ id_target

ID id_target
static

Definition at line 48 of file rb_channel.c.

GRPC_RB_MEMSIZE_UNAVAILABLE
#define GRPC_RB_MEMSIZE_UNAVAILABLE
Definition: rb_grpc.h:57
grpc_rb_channel_mark
static void grpc_rb_channel_mark(void *p)
Definition: rb_channel.c:173
grpc_rb_channel_free
static void grpc_rb_channel_free(void *p)
Definition: rb_channel.c:167


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