mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 12:46:30 +00:00
add loader and versioning
This commit is contained in:
@@ -10,7 +10,7 @@ using Exception = System.Exception;
|
||||
|
||||
namespace Azaion.CommonSecurity.Services;
|
||||
|
||||
public class LoaderClient(LoaderClientConfig config, ILogger logger, CancellationToken ct = default)
|
||||
public class LoaderClient(LoaderClientConfig config, ILogger logger, CancellationToken ct = default) : IDisposable
|
||||
{
|
||||
private readonly DealerSocket _dealer = new();
|
||||
private readonly Guid _clientId = Guid.NewGuid();
|
||||
@@ -24,7 +24,7 @@ public class LoaderClient(LoaderClientConfig config, ILogger logger, Cancellatio
|
||||
{
|
||||
FileName = SecurityConstants.EXTERNAL_LOADER_PATH,
|
||||
Arguments = $"--port {config.ZeroMqPort} --api {config.ApiUrl}",
|
||||
CreateNoWindow = true
|
||||
//CreateNoWindow = true
|
||||
};
|
||||
|
||||
process.OutputDataReceived += (_, e) =>
|
||||
@@ -90,4 +90,14 @@ public class LoaderClient(LoaderClientConfig config, ILogger logger, Cancellatio
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
_dealer.SendFrame(MessagePackSerializer.Serialize(new RemoteCommand(CommandType.Exit)));
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_dealer.Dispose();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user