nexus-rpc
    Preparing search index...

    Interface OperationContextExperimental

    Contextual information provided to every operation handler method.

    interface OperationContext {
        abortSignal: AbortSignal;
        headers: Record<string, string>;
        operation: string;
        service: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    abortSignal: AbortSignal

    An AbortSignal that is signaled when the current request is canceled, e.g. because the request timed out or the client disconnected.

    The framework will cancel the abort controller with an unspecified error type. The handler must rethrow the error object to confirm cancelation. The handler may ignore cancelation and return a result anyway, but there is no guarantee that the client will still be waiting for the result of that request.

    Note that cancelation of the current request is not the same thing - and does not relate with - cancelation of the operation itself, which is notified by calling the OperationHandler.cancel method.

    headers: Record<string, string>

    Request header fields.

    operation: string

    Name of the operation.

    service: string

    Name of the service that contains the operation.