Public Member Functions | |
def | is_active |
def | add_termination_callback |
def | time_remaining |
def | fail |
Provides operation-related information and action. Attributes: trace_id: A uuid.UUID identifying a particular set of related operations.
def grpc.framework.base.interfaces.OperationContext.add_termination_callback | ( | self, | |
callback | |||
) |
Adds a function to be called upon operation termination. Args: callback: A callable that will be passed an Outcome value.
def grpc.framework.base.interfaces.OperationContext.fail | ( | self, | |
exception | |||
) |
Indicates that the operation has failed. Args: exception: An exception germane to the operation failure. May be None.
def grpc.framework.base.interfaces.OperationContext.is_active | ( | self | ) |
Describes whether the operation is active or has terminated.
def grpc.framework.base.interfaces.OperationContext.time_remaining | ( | self | ) |
Describes the length of allowed time remaining for the operation. Returns: A nonnegative float indicating the length of allowed time in seconds remaining for the operation to complete before it is considered to have timed out.