21.242. Class WorkerStreamHandler

Namespace: ArmoniK.Core.Common.Stream.Worker
Assembly: ArmoniK.Core.Common.dll

Handles the interactions with the worker.

public class WorkerStreamHandler : IWorkerStreamHandler, IInitializable, IHealthCheckProvider, IDisposable

21.242.1. Inheritance

objectWorkerStreamHandler

21.242.2. Implements

IWorkerStreamHandler, IInitializable, IHealthCheckProvider, IDisposable

21.242.3. Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

21.242.4. Constructors

21.242.4.1. WorkerStreamHandler(GrpcChannelProvider, InitWorker, ILogger<WorkerStreamHandler>)

Initializes a new instance of the class.

public WorkerStreamHandler(GrpcChannelProvider channelProvider, InitWorker optionsInitWorker, ILogger<WorkerStreamHandler> logger)

21.242.4.1.1. Parameters

channelProvider GrpcChannelProvider

The gRPC channel provider.

optionsInitWorker InitWorker

The initialization options for the worker.

logger ILogger<WorkerStreamHandler>

The logger instance.

21.242.5. Methods

21.242.5.1. Check(HealthCheckTag)

Checks the status of a class for the given health check type.

public Task<HealthCheckResult> Check(HealthCheckTag tag)

21.242.5.1.1. Parameters

tag HealthCheckTag

Health check for which the class has to answer.

21.242.5.1.2. Returns

Task<HealthCheckResult>

The result of the check containing the status of the class for the health check type.

21.242.5.2. Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

21.242.5.3. Init(CancellationToken)

Executes an initialization process for the class

public Task Init(CancellationToken cancellationToken)

21.242.5.3.1. Parameters

cancellationToken CancellationToken

Token used to cancel the execution of the method

21.242.5.3.2. Returns

Task

Task representing the asynchronous execution of the method

21.242.5.4. StartTaskProcessing(TaskData, string, string, CancellationToken)

public Task<Output> StartTaskProcessing(TaskData taskData, string token, string dataFolder, CancellationToken cancellationToken)

21.242.5.4.1. Parameters

taskData TaskData

token string

dataFolder string

cancellationToken CancellationToken

21.242.5.4.2. Returns

Task<Output>