GRPC Core  0.11.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
lb_policy.c File Reference
#include "src/core/client_config/lb_policy.h"

Functions

void grpc_lb_policy_init (grpc_lb_policy *policy, const grpc_lb_policy_vtable *vtable)
 called by concrete implementations to initialize the base struct More...
 
void grpc_lb_policy_ref (grpc_lb_policy *policy)
 
void grpc_lb_policy_unref (grpc_lb_policy *policy)
 
void grpc_lb_policy_shutdown (grpc_lb_policy *policy)
 Start shutting down (fail any pending picks) More...
 
void grpc_lb_policy_pick (grpc_lb_policy *policy, grpc_pollset *pollset, grpc_metadata_batch *initial_metadata, grpc_subchannel **target, grpc_iomgr_closure *on_complete)
 Given initial metadata in initial_metadata, find an appropriate target for this rpc, and 'return' it by calling on_complete after setting target. More...
 
void grpc_lb_policy_broadcast (grpc_lb_policy *policy, grpc_transport_op *op)
 
void grpc_lb_policy_exit_idle (grpc_lb_policy *policy)
 
void grpc_lb_policy_notify_on_state_change (grpc_lb_policy *policy, grpc_connectivity_state *state, grpc_iomgr_closure *closure)
 
grpc_connectivity_state grpc_lb_policy_check_connectivity (grpc_lb_policy *policy)
 

Function Documentation

void grpc_lb_policy_broadcast ( grpc_lb_policy policy,
grpc_transport_op op 
)
grpc_connectivity_state grpc_lb_policy_check_connectivity ( grpc_lb_policy policy)
void grpc_lb_policy_exit_idle ( grpc_lb_policy policy)
void grpc_lb_policy_init ( grpc_lb_policy policy,
const grpc_lb_policy_vtable vtable 
)

called by concrete implementations to initialize the base struct

void grpc_lb_policy_notify_on_state_change ( grpc_lb_policy policy,
grpc_connectivity_state state,
grpc_iomgr_closure closure 
)
void grpc_lb_policy_pick ( grpc_lb_policy policy,
grpc_pollset pollset,
grpc_metadata_batch initial_metadata,
grpc_subchannel **  target,
grpc_iomgr_closure on_complete 
)

Given initial metadata in initial_metadata, find an appropriate target for this rpc, and 'return' it by calling on_complete after setting target.

Picking can be asynchronous. Any IO should be done under pollset.

void grpc_lb_policy_ref ( grpc_lb_policy policy)
void grpc_lb_policy_shutdown ( grpc_lb_policy policy)

Start shutting down (fail any pending picks)

void grpc_lb_policy_unref ( grpc_lb_policy policy)