interceptors#
Interceptor classes to use with gRPC services.
Classes:
Provides an interceptor class for batching gRPC calls. |
|
|
Provides a class for implementing |
|
Provides an interceptor class for checking the CFX server error state before gRPC calls are made. |
Provides an interceptor class for checking CFX server gRPC call response for an error state. |
|
Provides an interceptor class for tracing gRPC calls. |
- class ansys.cfx.core.services.interceptors.BatchInterceptor#
Bases:
UnaryUnaryClientInterceptorProvides an interceptor class for batching gRPC calls.
Methods:
__init__()Initialize an instance of the
BatchInterceptorclass.intercept_unary_unary(continuation, ...)Intercept unary-unary call for batch operation.
- class ansys.cfx.core.services.interceptors.BatchedFuture(result_cls)#
Bases:
FutureProvides a class for implementing
gRPC.Future interface.An instance of
BatchedFutureis returned if the gRPC method is queued to be executed in batch later.Methods:
__init__(result_cls)Initialize an instance of the
BatchedFutureclass.Add a function to be called at completion of the computation.
cancel()Attempt to cancel the computation.
Describe whether the computation was cancelled.
done()Describe whether the computation has taken place.
exception([timeout])Return the exception raised by the computation.
result([timeout])Return the result of the computation or raise its exception.
running()Describe whether the computation is taking place.
traceback([timeout])Access the traceback of the exception raised by the computation.
- class ansys.cfx.core.services.interceptors.ErrorStateInterceptor(cfx_error_state)#
Bases:
UnaryUnaryClientInterceptorProvides an interceptor class for checking the CFX server error state before gRPC calls are made.
Methods:
__init__(cfx_error_state)Initialize an instance of the
ErrorStateInterceptorclass.intercept_unary_unary(continuation, ...)Intercept unary-unary call for error state checking.
- class ansys.cfx.core.services.interceptors.GrpcErrorInterceptor#
Bases:
UnaryUnaryClientInterceptorProvides an interceptor class for checking CFX server gRPC call response for an error state.
Methods:
intercept_unary_unary(continuation, ...)Intercept unary-unary call for error state checking.
- class ansys.cfx.core.services.interceptors.TracingInterceptor#
Bases:
UnaryUnaryClientInterceptorProvides an interceptor class for tracing gRPC calls.
Methods:
__init__()Initialize an instance of the
TracingInterceptorclass.intercept_unary_unary(continuation, ...)Intercept unary-unary call for tracing.