grpc.framework.crust package¶
Submodules¶
grpc.framework.crust.implementations module¶
Entry points into the Crust layer of RPC Framework.
-
grpc.framework.crust.implementations.
dynamic_stub
(end, group, cardinalities, pool)[source]¶ Creates an face.DynamicStub.
Parameters: - end – A base.End.
- group – The group identifier for all RPCs to be made with the created face.DynamicStub.
- cardinalities – A dict from method identifier to cardinality.Cardinality value identifying the cardinality of every RPC method to be supported by the created face.DynamicStub.
- pool – A futures.ThreadPoolExecutor.
Returns: A face.DynamicStub that performs RPCs via the given base.End.
-
grpc.framework.crust.implementations.
generic_stub
(end, pool)[source]¶ Creates an face.GenericStub.
Parameters: - end – A base.End.
- pool – A futures.ThreadPoolExecutor.
Returns: A face.GenericStub that performs RPCs via the given base.End.
-
grpc.framework.crust.implementations.
servicer
(method_implementations, multi_method_implementation, pool)[source]¶ Creates a base.Servicer.
It is guaranteed that any passed face.MultiMethodImplementation will only be called to service an RPC if there is no face.MethodImplementation for the RPC method in the passed method_implementations dictionary.
Parameters: - method_implementations – A dictionary from RPC method name to face.MethodImplementation object to be used to service the named RPC method.
- multi_method_implementation – An face.MultiMethodImplementation to be used to service any RPCs not serviced by the face.MethodImplementations given in the method_implementations dictionary, or None.
- pool – A thread pool.
Returns: A base.Servicer that services RPCs via the given implementations.