GRPC Core
18.0.0
|
Interface for accessing per-call state. More...
#include <lb_policy.h>
Public Member Functions | |
CallState ()=default | |
virtual | ~CallState ()=default |
virtual void * | Alloc (size_t size)=0 |
Allocates memory associated with the call, which will be automatically freed when the call is complete. More... | |
virtual const BackendMetricData * | GetBackendMetricData ()=0 |
Returns the backend metric data returned by the server for the call, or null if no backend metric data was returned. More... | |
virtual absl::string_view | ExperimentalGetCallAttribute (const char *key)=0 |
EXPERIMENTAL API. More... | |
Interface for accessing per-call state.
Implemented by the client channel and used by the SubchannelPicker.
|
default |
|
virtualdefault |
|
pure virtual |
Allocates memory associated with the call, which will be automatically freed when the call is complete.
It is more efficient to use this than to allocate memory directly for allocations that need to be made on a per-call basis.
Implemented in grpc_core::ClientChannel::LoadBalancedCall::LbCallState.
|
pure virtual |
EXPERIMENTAL API.
Returns the value of the call attribute key. Keys are static strings, so an attribute can be accessed by an LB policy implementation only if it knows about the internal key. Returns a null string_view if key not found.
Implemented in grpc_core::ClientChannel::LoadBalancedCall::LbCallState.
|
pure virtual |
Returns the backend metric data returned by the server for the call, or null if no backend metric data was returned.
Implemented in grpc_core::ClientChannel::LoadBalancedCall::LbCallState.