X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FMessageValue.html;h=9b81cccdd537e98a7c877bca584e9e8fce8b6582;hb=2493c34370d0839614058bb55254fd7aec91b664;hp=b80f905c95c3a0bcce67bcb15a14a1ff11b432cb;hpb=85de1563849907302a372b5da416e5cb15c23307;p=poolifier.git diff --git a/docs/interfaces/MessageValue.html b/docs/interfaces/MessageValue.html index b80f905c..9b81cccd 100644 --- a/docs/interfaces/MessageValue.html +++ b/docs/interfaces/MessageValue.html @@ -1,7 +1,7 @@ -MessageValue | poolifier - v4.0.2

Interface MessageValue<Data, ErrorData>Internal

Message object that is passed between main worker and worker.

+MessageValue | poolifier - v4.0.11

Interface MessageValue<Data, ErrorData>Internal

Message object that is passed between main worker and worker.

interface MessageValue<Data, ErrorData> {
    checkActive?: boolean;
    data?: Data;
    kill?: true | "success" | "SOFT" | "HARD" | "failure";
    name?: string;
    port?: MessagePort;
    priority?: number;
    ready?: boolean;
    statistics?: WorkerStatistics;
    strategy?: "ROUND_ROBIN" | "LEAST_USED" | "LEAST_BUSY" | "LEAST_ELU" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN" | "INTERLEAVED_WEIGHTED_ROUND_ROBIN";
    taskFunction?: string;
    taskFunctionOperation?: "add" | "default" | "remove";
    taskFunctionOperationStatus?: boolean;
    taskFunctionProperties?: TaskFunctionProperties;
    taskFunctionsProperties?: TaskFunctionProperties[];
    taskId?: `${string}-${string}-${string}-${string}-${string}`;
    taskPerformance?: TaskPerformance;
    timestamp?: number;
    transferList?: readonly TransferListItem[];
    workerError?: WorkerError<ErrorData>;
    workerId?: number;
}

Type Parameters

  • Data = unknown

    Type of data sent to the worker or execution response. This can only be structured-cloneable data.

  • ErrorData = unknown

    Type of data sent to the worker triggering an error. This can only be structured-cloneable data.

    -

Hierarchy (view full)

Properties

Hierarchy (view full)

Properties

Properties

checkActive?: boolean

Whether the worker starts or stops its activity check.

-
data?: Data

Task input data that will be passed to the worker.

-
kill?: true | "success" | "SOFT" | "HARD" | "failure"

Kill code.

-
name?: string

Task name.

-
port?: MessagePort

Message port.

-
priority?: number

Task priority. Lower values have higher priority.

-

Default Value

0
+
data?: Data

Task input data that will be passed to the worker.

+
kill?: true | "success" | "SOFT" | "HARD" | "failure"

Kill code.

+
name?: string

Task name.

+
port?: MessagePort

Message port.

+
priority?: number

Task priority. Lower values have higher priority.

+

Default Value

0
 
-
ready?: boolean

Whether the worker is ready or not.

-
statistics?: WorkerStatistics

Whether the worker computes the given statistics or not.

-
strategy?: "ROUND_ROBIN" | "LEAST_USED" | "LEAST_BUSY" | "LEAST_ELU" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN" | "INTERLEAVED_WEIGHTED_ROUND_ROBIN"

Task worker choice strategy.

-
taskFunction?: string

Task function serialized to string.

-
taskFunctionOperation?: "add" | "default" | "remove"

Task function operation:

+
ready?: boolean

Whether the worker is ready or not.

+
statistics?: WorkerStatistics

Whether the worker computes the given statistics or not.

+
strategy?: "ROUND_ROBIN" | "LEAST_USED" | "LEAST_BUSY" | "LEAST_ELU" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN" | "INTERLEAVED_WEIGHTED_ROUND_ROBIN"

Task worker choice strategy.

+
taskFunction?: string

Task function serialized to string.

+
taskFunctionOperation?: "add" | "default" | "remove"

Task function operation:

  • 'add' - Add a task function.
  • 'remove' - Remove a task function.
  • 'default' - Set a task function as default.
-
taskFunctionOperationStatus?: boolean

Whether the task function operation is successful or not.

-
taskFunctionProperties?: TaskFunctionProperties

Task function properties.

-
taskFunctionsProperties?: TaskFunctionProperties[]

Task functions properties.

-
taskId?: `${string}-${string}-${string}-${string}-${string}`

Task UUID.

-
taskPerformance?: TaskPerformance

Task performance.

-
timestamp?: number

Timestamp.

-
transferList?: readonly TransferListItem[]

Array of transferable objects.

-
workerError?: WorkerError<ErrorData>

Worker error.

-
workerId?: number

Worker id.

-
\ No newline at end of file +
taskFunctionOperationStatus?: boolean

Whether the task function operation is successful or not.

+
taskFunctionProperties?: TaskFunctionProperties

Task function properties.

+
taskFunctionsProperties?: TaskFunctionProperties[]

Task functions properties.

+
taskId?: `${string}-${string}-${string}-${string}-${string}`

Task UUID.

+
taskPerformance?: TaskPerformance

Task performance.

+
timestamp?: number

Timestamp.

+
transferList?: readonly TransferListItem[]

Array of transferable objects.

+
workerError?: WorkerError<ErrorData>

Worker error.

+
workerId?: number

Worker id.

+
\ No newline at end of file