Skip to content

Commit

Permalink
Get remote ZFS server implemented (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
hach-que authored Dec 23, 2024
1 parent 5ca6fea commit 76be3c1
Show file tree
Hide file tree
Showing 12 changed files with 310 additions and 206 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ await _incoming.Connection.WriteAsync(new TcpGrpcResponseComplete
_incoming.LogTrace($"Wrote status ({statusCode}, '{details}') to client.");
}
}
catch (RpcException ex) when (ex.StatusCode == StatusCode.Unavailable)
{
// We can't send any content to the client, because the client has already disconnected.
_incoming.LogTrace($"Unable to send ({statusCode}, '{details}') to client because the client has already disconnected.");
return;
}
catch (OperationCanceledException) when (_serverCallContext.DeadlineCancellationToken.IsCancellationRequested)
{
// We can't send any content to the client, because we have exceeded our extended deadline cancellation.
Expand Down
10 changes: 6 additions & 4 deletions UET/Redpoint.Uet.Workspace/RemoteZfs/RemoteZfsProtocol.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ syntax = 'proto3';

package Redpoint.Uet.Workspace.RemoteZfs;

message EmptyRequest {
message AcquireWorkspaceRequest {
string templateId = 1;
repeated string disambiguators = 2;
}

message AcquireResponse {
string windowsSharePath = 1;
message AcquireWorkspaceResponse {
string windowsShareRemotePath = 1;
}

service RemoteZfs {
rpc Acquire(stream EmptyRequest) returns (stream AcquireResponse) {}
rpc AcquireWorkspace(AcquireWorkspaceRequest) returns (stream AcquireWorkspaceResponse) {}
}
136 changes: 0 additions & 136 deletions UET/Redpoint.Uet.Workspace/RemoteZfs/RemoteZfsServer.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
namespace UET.Commands.Internal.RemoteZfsServer
{
using System.Text.Json.Serialization;

[JsonSerializable(typeof(TrueNasQueryOptions))]
[JsonSerializable(typeof(TrueNasQuery))]
[JsonSerializable(typeof(TrueNasSnapshot[]))]
[JsonSerializable(typeof(TrueNasSnapshotClone))]
[JsonSerializable(typeof(RemoteZfsServerConfig))]
[JsonSerializable(typeof(RemoteZfsServerConfigTemplate))]
internal partial class RemoteZfsSerializerContext : JsonSerializerContext
{
}
}
Loading

0 comments on commit 76be3c1

Please sign in to comment.