gRPC  0.6.0
 All Classes Namespaces Functions Variables Enumerations Properties Pages
Public Member Functions | List of all members
grpc.framework.base.interfaces.OperationContext Class Reference
Inheritance diagram for grpc.framework.base.interfaces.OperationContext:
grpc.framework.base._context.OperationContext

Public Member Functions

def is_active
 
def add_termination_callback
 
def time_remaining
 
def fail
 

Detailed Description

Provides operation-related information and action.

Attributes:
  trace_id: A uuid.UUID identifying a particular set of related operations.

Member Function Documentation

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.

The documentation for this class was generated from the following file: