nexus-rpc
    Preparing search index...

    Interface StartOperationContextExperimental

    Context for the OperationHandler.start method.

    interface StartOperationContext {
        abortSignal: AbortSignal;
        callbackHeaders?: Record<string, string>;
        callbackUrl?: string;
        headers: Record<string, string>;
        inboundLinks: Link[];
        operation: string;
        outboundLinks: Link[];
        requestId?: 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.

    callbackHeaders?: Record<string, string>

    Optional header fields set by a client that are required to be attached to the callback request when an asynchronous operation completes.

    callbackUrl?: string

    Callbacks are used to deliver completion of async operations.

    A callback URL may optionally be provided by the client and should be called by this handler upon completion if the started operation is async.

    headers: Record<string, string>

    Request header fields.

    inboundLinks: Link[]

    Links received in the request.

    This list is automatically populated when handling a start request. Handlers may use these links, for example to add information about the caller to a resource associated with the operation execution.

    operation: string

    Name of the operation.

    outboundLinks: Link[]

    Links to be returned by the handler.

    This list is initially empty. Handlers may add to this list, for example links describing resources associated with the operation execution that may be of use to the caller.

    requestId?: string

    Request ID that may be used by the server handler to dedupe a start request. By default a v4 UUID will be generated by the client.

    service: string

    Name of the service that contains the operation.