class documentation

Handle representing a standalone Nexus operation execution.

Warning

This API is experimental and unstable.

Method __init__ Create nexus operation handle.
Async Method cancel Request cancellation of the Nexus operation.
Async Method describe Describe the Nexus operation execution.
Async Method result Wait for result of the Nexus operation.
Async Method terminate Terminate the Nexus operation execution immediately.
Property endpoint Endpoint name.
Property operation_id ID of the operation.
Property run_id Run ID of the operation.
Property service Service name.
Instance Variable _client Undocumented
Instance Variable _endpoint Undocumented
Instance Variable _known_outcome Undocumented
Instance Variable _operation_id Undocumented
Instance Variable _result_type Undocumented
Instance Variable _run_id Undocumented
Instance Variable _service Undocumented
def __init__(self, client: Client, operation_id: str, *, run_id: str | None = None, result_type: type | None = None, endpoint: str = '', service: str = ''): (source)

Create nexus operation handle.

async def cancel(self, *, reason: str | None = None, rpc_metadata: Mapping[str, str | bytes] = {}, rpc_timeout: timedelta | None = None): (source)

Request cancellation of the Nexus operation.

Warning

This API is experimental and unstable.

Parameters
reason:str | NoneReason for the cancellation.
rpc_metadata:Mapping[str, str | bytes]Headers used on the RPC call.
rpc_timeout:timedelta | NoneOptional RPC deadline to set for the RPC call.
async def describe(self, *, rpc_metadata: Mapping[str, str | bytes] = {}, rpc_timeout: timedelta | None = None) -> NexusOperationExecutionDescription: (source)

Describe the Nexus operation execution.

Warning

This API is experimental and unstable.

Parameters
rpc_metadata:Mapping[str, str | bytes]Headers used on the RPC call.
rpc_timeout:timedelta | NoneOptional RPC deadline to set for the RPC call.
Returns
NexusOperationExecutionDescriptionNexus operation execution description.
async def result(self, *, rpc_metadata: Mapping[str, str | bytes] = {}, rpc_timeout: timedelta | None = None) -> ReturnType: (source)

Wait for result of the Nexus operation.

Warning

This API is experimental and unstable.

The result may already be known if this method has been called before, in which case no network call is made. Otherwise the result will be polled for until it is available.

Parameters
rpc_metadata:Mapping[str, str | bytes]Headers used on the RPC call. Keys here override client-level RPC metadata keys.
rpc_timeout:timedelta | NoneOptional RPC deadline to set for each RPC call. Note: this is the timeout for each RPC call while polling, not a timeout for the function as a whole. If an individual RPC times out, it will be retried until the result is available.
Returns
ReturnTypeThe result of the operation.
Raises
NexusOperationFailureErrorIf the operation completed with a failure.
RPCErrorOperation result could not be fetched for some reason.
async def terminate(self, *, reason: str | None = None, rpc_metadata: Mapping[str, str | bytes] = {}, rpc_timeout: timedelta | None = None): (source)

Terminate the Nexus operation execution immediately.

Warning

This API is experimental and unstable.

Parameters
reason:str | NoneReason for the termination.
rpc_metadata:Mapping[str, str | bytes]Headers used on the RPC call.
rpc_timeout:timedelta | NoneOptional RPC deadline to set for the RPC call.

Endpoint name.

operation_id: str = (source)

ID of the operation.

Run ID of the operation.

Service name.

Undocumented

_endpoint = (source)

Undocumented

_operation_id = (source)

Undocumented

_result_type = (source)

Undocumented

Undocumented

_service = (source)

Undocumented