class documentation

class SyncOperationHandler(OperationHandler[InputT, OutputT]):

Constructor: SyncOperationHandler(start)

View In Hierarchy

An OperationHandler that is limited to responding synchronously.

This version of the class uses async def methods. For the syncio version, see nexusrpc.handler._syncio.SyncOperationHandler.

Method __init__ Undocumented
Async Method cancel Cancel the operation.
Async Method fetch_info Return information about the current status of the operation.
Async Method fetch_result Return the result of the operation.
Async Method start Start the operation and return its final result synchronously.
Instance Variable _start Undocumented
def __init__(self, start: Callable[[StartOperationContext, InputT], Awaitable[OutputT]]):

Undocumented

async def cancel(self, ctx: CancelOperationContext, token: str):

Cancel the operation.

async def fetch_info(self, ctx: FetchOperationInfoContext, token: str) -> OperationInfo:

Return information about the current status of the operation.

async def fetch_result(self, ctx: FetchOperationResultContext, token: str) -> OutputT:

Return the result of the operation.

async def start(self, ctx: StartOperationContext, input: InputT) -> StartOperationResultSync[OutputT]:

Start the operation and return its final result synchronously.

The name 'SyncOperationHandler' means that it responds synchronously in the sense that the start method delivers the final operation result as its return value, rather than returning an operation token representing an in-progress operation. This version of the class uses async def methods. For the syncio version, see nexusrpc.handler.syncio.SyncOperationHandler.

_start =

Undocumented