Skip to content

Commit 449bbd9

Browse files
authored
feat: add daemon service to MutagenSdk (#56)
- Adds support for an array of protobuf "entry points" in `Mutagen/Update-Proto.ps1` - Also refactors file modification/writing to be more efficient and to not include an unnecessary byte order mark and two trailing new lines - Adds Daemon service to `MutagenClient`
1 parent 0fefe8a commit 449bbd9

26 files changed

+103
-61
lines changed

MutagenSdk/MutagenClient.cs

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using Coder.Desktop.MutagenSdk.Proto.Service.Daemon;
12
using Coder.Desktop.MutagenSdk.Proto.Service.Synchronization;
23
using Grpc.Core;
34
using Grpc.Net.Client;
@@ -8,6 +9,7 @@ public class MutagenClient : IDisposable
89
{
910
private readonly GrpcChannel _channel;
1011

12+
public readonly Daemon.DaemonClient Daemon;
1113
public readonly Synchronization.SynchronizationClient Synchronization;
1214

1315
public MutagenClient(string dataDir)
@@ -39,11 +41,15 @@ public MutagenClient(string dataDir)
3941
ConnectCallback = connectionFactory.ConnectAsync,
4042
};
4143

44+
// http://localhost is fake address. The HttpHandler will be used to
45+
// open a socket to the named pipe.
4246
_channel = GrpcChannel.ForAddress("http://localhost", new GrpcChannelOptions
4347
{
4448
Credentials = ChannelCredentials.Insecure,
4549
HttpHandler = socketsHttpHandler,
4650
});
51+
52+
Daemon = new Daemon.DaemonClient(_channel);
4753
Synchronization = new Synchronization.SynchronizationClient(_channel);
4854
}
4955

MutagenSdk/Proto/filesystem/behavior/probe_mode.proto

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/selection/selection.proto

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/service/daemon/daemon.proto

+53
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/service/synchronization/synchronization.proto

+2-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/compression/algorithm.proto

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/configuration.proto

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/core/change.proto

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/core/conflict.proto

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/core/entry.proto

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/core/ignore/ignore_vcs_mode.proto

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/core/ignore/syntax.proto

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/core/mode.proto

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/core/permissions_mode.proto

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/core/problem.proto

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/core/symbolic_link_mode.proto

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/hashing/algorithm.proto

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/rsync/receive.proto

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/scan_mode.proto

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/session.proto

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/stage_mode.proto

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/state.proto

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/version.proto

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/synchronization/watch_mode.proto

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MutagenSdk/Proto/url/url.proto

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)