diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/ext/client_channel/resolver_registry.h | 4 | ||||
-rw-r--r-- | src/core/lib/iomgr/resource_quota.c | 5 | ||||
-rw-r--r-- | src/core/lib/iomgr/resource_quota.h | 6 | ||||
-rw-r--r-- | src/cpp/common/channel_arguments.cc | 8 | ||||
-rw-r--r-- | src/python/grpcio/grpc/__init__.py | 23 |
5 files changed, 33 insertions, 13 deletions
diff --git a/src/core/ext/client_channel/resolver_registry.h b/src/core/ext/client_channel/resolver_registry.h index 4fb16131db..a4606463eb 100644 --- a/src/core/ext/client_channel/resolver_registry.h +++ b/src/core/ext/client_channel/resolver_registry.h @@ -60,7 +60,9 @@ void grpc_register_resolver_type(grpc_resolver_factory *factory); return it. If a resolver factory was not found, return NULL. \a args is a set of channel arguments to be included in the result - (typically the set of arguments passed in from the client API). */ + (typically the set of arguments passed in from the client API). + \a pollset_set is used to drive IO in the name resolution process, it + should not be NULL. */ grpc_resolver *grpc_resolver_create(grpc_exec_ctx *exec_ctx, const char *target, const grpc_channel_args *args, grpc_pollset_set *pollset_set); diff --git a/src/core/lib/iomgr/resource_quota.c b/src/core/lib/iomgr/resource_quota.c index 42a044df77..31590cd53b 100644 --- a/src/core/lib/iomgr/resource_quota.c +++ b/src/core/lib/iomgr/resource_quota.c @@ -691,6 +691,11 @@ grpc_resource_user *grpc_resource_user_create( return resource_user; } +grpc_resource_quota *grpc_resource_user_quota( + grpc_resource_user *resource_user) { + return resource_user->resource_quota; +} + static void ru_ref_by(grpc_resource_user *resource_user, gpr_atm amount) { GPR_ASSERT(amount > 0); GPR_ASSERT(gpr_atm_no_barrier_fetch_add(&resource_user->refs, amount) != 0); diff --git a/src/core/lib/iomgr/resource_quota.h b/src/core/lib/iomgr/resource_quota.h index ef286c2fce..d1127ce9ea 100644 --- a/src/core/lib/iomgr/resource_quota.h +++ b/src/core/lib/iomgr/resource_quota.h @@ -88,6 +88,12 @@ typedef struct grpc_resource_user grpc_resource_user; grpc_resource_user *grpc_resource_user_create( grpc_resource_quota *resource_quota, const char *name); + +/* Returns a borrowed reference to the underlying resource quota for this + resource user. */ +grpc_resource_quota *grpc_resource_user_quota( + grpc_resource_user *resource_user); + void grpc_resource_user_ref(grpc_resource_user *resource_user); void grpc_resource_user_unref(grpc_exec_ctx *exec_ctx, grpc_resource_user *resource_user); diff --git a/src/cpp/common/channel_arguments.cc b/src/cpp/common/channel_arguments.cc index 1fdd106130..65f3277499 100644 --- a/src/cpp/common/channel_arguments.cc +++ b/src/cpp/common/channel_arguments.cc @@ -143,6 +143,14 @@ void ChannelArguments::SetResourceQuota( grpc_resource_quota_arg_vtable()); } +void ChannelArguments::SetMaxReceiveMessageSize(int size) { + SetInt(GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH, size); +} + +void ChannelArguments::SetMaxSendMessageSize(int size) { + SetInt(GRPC_ARG_MAX_SEND_MESSAGE_LENGTH, size); +} + void ChannelArguments::SetLoadBalancingPolicyName( const grpc::string& lb_policy_name) { SetString(GRPC_ARG_LB_POLICY_NAME, lb_policy_name); diff --git a/src/python/grpcio/grpc/__init__.py b/src/python/grpcio/grpc/__init__.py index abe14e7049..fe29971799 100644 --- a/src/python/grpcio/grpc/__init__.py +++ b/src/python/grpcio/grpc/__init__.py @@ -487,9 +487,9 @@ class UnaryUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)): Returns: An object that is both a Call for the RPC and a Future. In the event of - RPC completion, the return Future's result value will be the response - message of the RPC. Should the event terminate with non-OK status, the - returned Future's exception value will be an RpcError. + RPC completion, the return Call-Future's result value will be the + response message of the RPC. Should the event terminate with non-OK + status, the returned Call-Future's exception value will be an RpcError. """ raise NotImplementedError() @@ -510,8 +510,8 @@ class UnaryStreamMultiCallable(six.with_metaclass(abc.ABCMeta)): Returns: An object that is both a Call for the RPC and an iterator of response - values. Drawing response values from the returned iterator may raise - RpcError indicating termination of the RPC with non-OK status. + values. Drawing response values from the returned Call-iterator may + raise RpcError indicating termination of the RPC with non-OK status. """ raise NotImplementedError() @@ -535,8 +535,7 @@ class StreamUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)): credentials: An optional CallCredentials for the RPC. Returns: - The response value for the RPC, and a Call for the RPC if with_call was - set to True at invocation. + The response value for the RPC. Raises: RpcError: Indicating that the RPC terminated with non-OK status. The @@ -587,9 +586,9 @@ class StreamUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)): Returns: An object that is both a Call for the RPC and a Future. In the event of - RPC completion, the return Future's result value will be the response - message of the RPC. Should the event terminate with non-OK status, the - returned Future's exception value will be an RpcError. + RPC completion, the return Call-Future's result value will be the + response message of the RPC. Should the event terminate with non-OK + status, the returned Call-Future's exception value will be an RpcError. """ raise NotImplementedError() @@ -614,8 +613,8 @@ class StreamStreamMultiCallable(six.with_metaclass(abc.ABCMeta)): Returns: An object that is both a Call for the RPC and an iterator of response - values. Drawing response values from the returned iterator may raise - RpcError indicating termination of the RPC with non-OK status. + values. Drawing response values from the returned Call-iterator may + raise RpcError indicating termination of the RPC with non-OK status. """ raise NotImplementedError() |