swarpc - v0.14.0
    Preparing search index...

    Type Alias ProcedureImplementation<I, P, S>

    ProcedureImplementation: (
        input: I["inferOut"],
        onProgress: (progress: P["inferIn"]) => void,
        tools: {
            abortSignal?: AbortSignal;
            logger: RequestBoundLogger;
            nodeId: string;
        },
    ) => Promise<S["inferIn"]>

    An implementation of a procedure

    Type Parameters

    • I extends Type
    • P extends Type
    • S extends Type

    Type Declaration

      • (
            input: I["inferOut"],
            onProgress: (progress: P["inferIn"]) => void,
            tools: {
                abortSignal?: AbortSignal;
                logger: RequestBoundLogger;
                nodeId: string;
            },
        ): Promise<S["inferIn"]>
      • Parameters

        • input: I["inferOut"]
        • onProgress: (progress: P["inferIn"]) => void
        • tools: { abortSignal?: AbortSignal; logger: RequestBoundLogger; nodeId: string }
          • OptionalabortSignal?: AbortSignal

            AbortSignal that can be used to handle request cancellation -- see Make cancellable requests

          • logger: RequestBoundLogger

            Logger instance to use for logging messages related to this procedure call, using the same format as SWARPC's built-in logging.

          • nodeId: string

            ID of the Node the request is being processed on.

        Returns Promise<S["inferIn"]>