f7929cc12f
# Conflicts: # src/MxGateway.Worker.Tests/Ipc/WorkerPipeSessionTests.cs # src/MxGateway.Worker/Ipc/WorkerPipeClient.cs # src/MxGateway.Worker/Ipc/WorkerPipeSession.cs
26 lines
657 B
C#
26 lines
657 B
C#
using System;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using MxGateway.Contracts.Proto;
|
|
using MxGateway.Worker.Sta;
|
|
|
|
namespace MxGateway.Worker.MxAccess;
|
|
|
|
public interface IWorkerRuntimeSession : IDisposable
|
|
{
|
|
Task<WorkerReady> StartAsync(
|
|
string sessionId,
|
|
int workerProcessId,
|
|
CancellationToken cancellationToken = default);
|
|
|
|
Task<MxCommandReply> DispatchAsync(StaCommand command);
|
|
|
|
WorkerRuntimeHeartbeatSnapshot CaptureHeartbeat();
|
|
|
|
void RequestShutdown();
|
|
|
|
Task<MxAccessShutdownResult> ShutdownGracefullyAsync(
|
|
TimeSpan timeout,
|
|
CancellationToken cancellationToken = default);
|
|
}
|