diff --git a/clients/dotnet/MxGateway.Client.Cli/MxGateway.Client.Cli.csproj b/clients/dotnet/MxGateway.Client.Cli/MxGateway.Client.Cli.csproj
new file mode 100644
index 0000000..b04f285
--- /dev/null
+++ b/clients/dotnet/MxGateway.Client.Cli/MxGateway.Client.Cli.csproj
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+ Exe
+ net10.0
+ enable
+ enable
+
+
+
diff --git a/clients/dotnet/MxGateway.Client.Cli/MxGatewayClientCli.cs b/clients/dotnet/MxGateway.Client.Cli/MxGatewayClientCli.cs
new file mode 100644
index 0000000..8b64cd6
--- /dev/null
+++ b/clients/dotnet/MxGateway.Client.Cli/MxGatewayClientCli.cs
@@ -0,0 +1,48 @@
+using MxGateway.Client;
+
+namespace MxGateway.Client.Cli;
+
+public static class MxGatewayClientCli
+{
+ public static int Run(
+ string[] args,
+ TextWriter standardOutput,
+ TextWriter standardError)
+ {
+ ArgumentNullException.ThrowIfNull(args);
+ ArgumentNullException.ThrowIfNull(standardOutput);
+ ArgumentNullException.ThrowIfNull(standardError);
+
+ if (args.Length is 0 || IsHelp(args[0]))
+ {
+ WriteUsage(standardOutput);
+ return 0;
+ }
+
+ if (string.Equals(args[0], "version", StringComparison.OrdinalIgnoreCase))
+ {
+ standardOutput.WriteLine(
+ $"gateway-protocol={MxGatewayClientContractInfo.GatewayProtocolVersion}");
+ standardOutput.WriteLine(
+ $"worker-protocol={MxGatewayClientContractInfo.WorkerProtocolVersion}");
+ return 0;
+ }
+
+ standardError.WriteLine($"Unknown command '{args[0]}'.");
+ WriteUsage(standardError);
+ return 2;
+ }
+
+ private static bool IsHelp(string value)
+ {
+ return string.Equals(value, "-h", StringComparison.OrdinalIgnoreCase)
+ || string.Equals(value, "--help", StringComparison.OrdinalIgnoreCase)
+ || string.Equals(value, "help", StringComparison.OrdinalIgnoreCase);
+ }
+
+ private static void WriteUsage(TextWriter writer)
+ {
+ writer.WriteLine("mxgw-dotnet version");
+ writer.WriteLine("mxgw-dotnet --help");
+ }
+}
diff --git a/clients/dotnet/MxGateway.Client.Cli/Program.cs b/clients/dotnet/MxGateway.Client.Cli/Program.cs
new file mode 100644
index 0000000..3f1db75
--- /dev/null
+++ b/clients/dotnet/MxGateway.Client.Cli/Program.cs
@@ -0,0 +1,3 @@
+using MxGateway.Client.Cli;
+
+return MxGatewayClientCli.Run(args, Console.Out, Console.Error);
diff --git a/clients/dotnet/MxGateway.Client.Tests/MxGateway.Client.Tests.csproj b/clients/dotnet/MxGateway.Client.Tests/MxGateway.Client.Tests.csproj
new file mode 100644
index 0000000..d02ed8e
--- /dev/null
+++ b/clients/dotnet/MxGateway.Client.Tests/MxGateway.Client.Tests.csproj
@@ -0,0 +1,26 @@
+
+
+
+ net10.0
+ enable
+ enable
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/clients/dotnet/MxGateway.Client.Tests/MxGatewayClientCliTests.cs b/clients/dotnet/MxGateway.Client.Tests/MxGatewayClientCliTests.cs
new file mode 100644
index 0000000..5ee9ebc
--- /dev/null
+++ b/clients/dotnet/MxGateway.Client.Tests/MxGatewayClientCliTests.cs
@@ -0,0 +1,20 @@
+using MxGateway.Client.Cli;
+
+namespace MxGateway.Client.Tests;
+
+public sealed class MxGatewayClientCliTests
+{
+ [Fact]
+ public void Run_Version_PrintsCompiledProtocolVersions()
+ {
+ using var output = new StringWriter();
+ using var error = new StringWriter();
+
+ var exitCode = MxGatewayClientCli.Run(["version"], output, error);
+
+ Assert.Equal(0, exitCode);
+ Assert.Contains("gateway-protocol=1", output.ToString());
+ Assert.Contains("worker-protocol=1", output.ToString());
+ Assert.Equal(string.Empty, error.ToString());
+ }
+}
diff --git a/clients/dotnet/MxGateway.Client.Tests/MxGatewayClientContractInfoTests.cs b/clients/dotnet/MxGateway.Client.Tests/MxGatewayClientContractInfoTests.cs
new file mode 100644
index 0000000..1458347
--- /dev/null
+++ b/clients/dotnet/MxGateway.Client.Tests/MxGatewayClientContractInfoTests.cs
@@ -0,0 +1,22 @@
+using MxGateway.Contracts;
+
+namespace MxGateway.Client.Tests;
+
+public sealed class MxGatewayClientContractInfoTests
+{
+ [Fact]
+ public void GatewayProtocolVersion_MatchesSharedContract()
+ {
+ Assert.Equal(
+ GatewayContractInfo.GatewayProtocolVersion,
+ MxGatewayClientContractInfo.GatewayProtocolVersion);
+ }
+
+ [Fact]
+ public void WorkerProtocolVersion_MatchesSharedContract()
+ {
+ Assert.Equal(
+ GatewayContractInfo.WorkerProtocolVersion,
+ MxGatewayClientContractInfo.WorkerProtocolVersion);
+ }
+}
diff --git a/clients/dotnet/MxGateway.Client.Tests/MxGatewayClientOptionsTests.cs b/clients/dotnet/MxGateway.Client.Tests/MxGatewayClientOptionsTests.cs
new file mode 100644
index 0000000..8c91227
--- /dev/null
+++ b/clients/dotnet/MxGateway.Client.Tests/MxGatewayClientOptionsTests.cs
@@ -0,0 +1,28 @@
+namespace MxGateway.Client.Tests;
+
+public sealed class MxGatewayClientOptionsTests
+{
+ [Fact]
+ public void Validate_WithAbsoluteEndpointAndApiKey_Succeeds()
+ {
+ var options = new MxGatewayClientOptions
+ {
+ Endpoint = new Uri("http://localhost:5000"),
+ ApiKey = "test-api-key",
+ };
+
+ options.Validate();
+ }
+
+ [Fact]
+ public void Validate_WithEmptyApiKey_Throws()
+ {
+ var options = new MxGatewayClientOptions
+ {
+ Endpoint = new Uri("http://localhost:5000"),
+ ApiKey = "",
+ };
+
+ Assert.Throws(options.Validate);
+ }
+}
diff --git a/clients/dotnet/MxGateway.Client.Tests/MxGatewayGeneratedContractTests.cs b/clients/dotnet/MxGateway.Client.Tests/MxGatewayGeneratedContractTests.cs
new file mode 100644
index 0000000..846d9e3
--- /dev/null
+++ b/clients/dotnet/MxGateway.Client.Tests/MxGatewayGeneratedContractTests.cs
@@ -0,0 +1,18 @@
+namespace MxGateway.Client.Tests;
+
+public sealed class MxGatewayGeneratedContractTests
+{
+ [Fact]
+ public async Task GeneratedGrpcClient_CanBeConstructedFromClientFactory()
+ {
+ var options = new MxGatewayClientOptions
+ {
+ Endpoint = new Uri("http://localhost:5000"),
+ ApiKey = "test-api-key",
+ };
+
+ await using var client = MxGatewayClient.Create(options);
+
+ Assert.NotNull(client.RawClient);
+ }
+}
diff --git a/clients/dotnet/MxGateway.Client.sln b/clients/dotnet/MxGateway.Client.sln
new file mode 100644
index 0000000..07a6a8c
--- /dev/null
+++ b/clients/dotnet/MxGateway.Client.sln
@@ -0,0 +1,76 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.0.31903.59
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MxGateway.Client", "MxGateway.Client\MxGateway.Client.csproj", "{7CF9ED88-1F32-4040-BEB1-D0902E304C70}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MxGateway.Contracts", "..\..\src\MxGateway.Contracts\MxGateway.Contracts.csproj", "{9AB807A8-0469-40F7-A000-D240F36B6E5D}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MxGateway.Client.Cli", "MxGateway.Client.Cli\MxGateway.Client.Cli.csproj", "{EB061E77-2475-4322-9257-3F2456DD141C}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MxGateway.Client.Tests", "MxGateway.Client.Tests\MxGateway.Client.Tests.csproj", "{B77B5A8E-0C53-4419-9BCD-227C9753A074}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {7CF9ED88-1F32-4040-BEB1-D0902E304C70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7CF9ED88-1F32-4040-BEB1-D0902E304C70}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7CF9ED88-1F32-4040-BEB1-D0902E304C70}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {7CF9ED88-1F32-4040-BEB1-D0902E304C70}.Debug|x64.Build.0 = Debug|Any CPU
+ {7CF9ED88-1F32-4040-BEB1-D0902E304C70}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {7CF9ED88-1F32-4040-BEB1-D0902E304C70}.Debug|x86.Build.0 = Debug|Any CPU
+ {7CF9ED88-1F32-4040-BEB1-D0902E304C70}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7CF9ED88-1F32-4040-BEB1-D0902E304C70}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7CF9ED88-1F32-4040-BEB1-D0902E304C70}.Release|x64.ActiveCfg = Release|Any CPU
+ {7CF9ED88-1F32-4040-BEB1-D0902E304C70}.Release|x64.Build.0 = Release|Any CPU
+ {7CF9ED88-1F32-4040-BEB1-D0902E304C70}.Release|x86.ActiveCfg = Release|Any CPU
+ {7CF9ED88-1F32-4040-BEB1-D0902E304C70}.Release|x86.Build.0 = Release|Any CPU
+ {9AB807A8-0469-40F7-A000-D240F36B6E5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9AB807A8-0469-40F7-A000-D240F36B6E5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9AB807A8-0469-40F7-A000-D240F36B6E5D}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {9AB807A8-0469-40F7-A000-D240F36B6E5D}.Debug|x64.Build.0 = Debug|Any CPU
+ {9AB807A8-0469-40F7-A000-D240F36B6E5D}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {9AB807A8-0469-40F7-A000-D240F36B6E5D}.Debug|x86.Build.0 = Debug|Any CPU
+ {9AB807A8-0469-40F7-A000-D240F36B6E5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9AB807A8-0469-40F7-A000-D240F36B6E5D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9AB807A8-0469-40F7-A000-D240F36B6E5D}.Release|x64.ActiveCfg = Release|Any CPU
+ {9AB807A8-0469-40F7-A000-D240F36B6E5D}.Release|x64.Build.0 = Release|Any CPU
+ {9AB807A8-0469-40F7-A000-D240F36B6E5D}.Release|x86.ActiveCfg = Release|Any CPU
+ {9AB807A8-0469-40F7-A000-D240F36B6E5D}.Release|x86.Build.0 = Release|Any CPU
+ {EB061E77-2475-4322-9257-3F2456DD141C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {EB061E77-2475-4322-9257-3F2456DD141C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {EB061E77-2475-4322-9257-3F2456DD141C}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {EB061E77-2475-4322-9257-3F2456DD141C}.Debug|x64.Build.0 = Debug|Any CPU
+ {EB061E77-2475-4322-9257-3F2456DD141C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {EB061E77-2475-4322-9257-3F2456DD141C}.Debug|x86.Build.0 = Debug|Any CPU
+ {EB061E77-2475-4322-9257-3F2456DD141C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {EB061E77-2475-4322-9257-3F2456DD141C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {EB061E77-2475-4322-9257-3F2456DD141C}.Release|x64.ActiveCfg = Release|Any CPU
+ {EB061E77-2475-4322-9257-3F2456DD141C}.Release|x64.Build.0 = Release|Any CPU
+ {EB061E77-2475-4322-9257-3F2456DD141C}.Release|x86.ActiveCfg = Release|Any CPU
+ {EB061E77-2475-4322-9257-3F2456DD141C}.Release|x86.Build.0 = Release|Any CPU
+ {B77B5A8E-0C53-4419-9BCD-227C9753A074}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B77B5A8E-0C53-4419-9BCD-227C9753A074}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B77B5A8E-0C53-4419-9BCD-227C9753A074}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {B77B5A8E-0C53-4419-9BCD-227C9753A074}.Debug|x64.Build.0 = Debug|Any CPU
+ {B77B5A8E-0C53-4419-9BCD-227C9753A074}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {B77B5A8E-0C53-4419-9BCD-227C9753A074}.Debug|x86.Build.0 = Debug|Any CPU
+ {B77B5A8E-0C53-4419-9BCD-227C9753A074}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B77B5A8E-0C53-4419-9BCD-227C9753A074}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B77B5A8E-0C53-4419-9BCD-227C9753A074}.Release|x64.ActiveCfg = Release|Any CPU
+ {B77B5A8E-0C53-4419-9BCD-227C9753A074}.Release|x64.Build.0 = Release|Any CPU
+ {B77B5A8E-0C53-4419-9BCD-227C9753A074}.Release|x86.ActiveCfg = Release|Any CPU
+ {B77B5A8E-0C53-4419-9BCD-227C9753A074}.Release|x86.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/clients/dotnet/MxGateway.Client/MxGateway.Client.csproj b/clients/dotnet/MxGateway.Client/MxGateway.Client.csproj
new file mode 100644
index 0000000..d505aa4
--- /dev/null
+++ b/clients/dotnet/MxGateway.Client/MxGateway.Client.csproj
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ net10.0
+ enable
+ enable
+
+
+
diff --git a/clients/dotnet/MxGateway.Client/MxGatewayClient.cs b/clients/dotnet/MxGateway.Client/MxGatewayClient.cs
new file mode 100644
index 0000000..efa8ce8
--- /dev/null
+++ b/clients/dotnet/MxGateway.Client/MxGatewayClient.cs
@@ -0,0 +1,41 @@
+using Grpc.Net.Client;
+using MxGateway.Contracts.Proto;
+
+namespace MxGateway.Client;
+
+///
+/// Provides the initial .NET client entry point and raw generated gRPC client.
+///
+public sealed class MxGatewayClient : IAsyncDisposable
+{
+ private readonly GrpcChannel _channel;
+
+ private MxGatewayClient(GrpcChannel channel)
+ {
+ _channel = channel;
+ RawClient = new MxAccessGateway.MxAccessGatewayClient(channel);
+ }
+
+ public MxAccessGateway.MxAccessGatewayClient RawClient { get; }
+
+ public static MxGatewayClient Create(MxGatewayClientOptions options)
+ {
+ ArgumentNullException.ThrowIfNull(options);
+ options.Validate();
+
+ var channel = GrpcChannel.ForAddress(
+ options.Endpoint,
+ new GrpcChannelOptions
+ {
+ LoggerFactory = options.LoggerFactory,
+ });
+
+ return new MxGatewayClient(channel);
+ }
+
+ public ValueTask DisposeAsync()
+ {
+ _channel.Dispose();
+ return ValueTask.CompletedTask;
+ }
+}
diff --git a/clients/dotnet/MxGateway.Client/MxGatewayClientContractInfo.cs b/clients/dotnet/MxGateway.Client/MxGatewayClientContractInfo.cs
new file mode 100644
index 0000000..4869faa
--- /dev/null
+++ b/clients/dotnet/MxGateway.Client/MxGatewayClientContractInfo.cs
@@ -0,0 +1,15 @@
+using MxGateway.Contracts;
+
+namespace MxGateway.Client;
+
+///
+/// Exposes the protocol versions compiled into this client package.
+///
+public static class MxGatewayClientContractInfo
+{
+ public const uint GatewayProtocolVersion =
+ GatewayContractInfo.GatewayProtocolVersion;
+
+ public const uint WorkerProtocolVersion =
+ GatewayContractInfo.WorkerProtocolVersion;
+}
diff --git a/clients/dotnet/MxGateway.Client/MxGatewayClientOptions.cs b/clients/dotnet/MxGateway.Client/MxGatewayClientOptions.cs
new file mode 100644
index 0000000..b6863c5
--- /dev/null
+++ b/clients/dotnet/MxGateway.Client/MxGatewayClientOptions.cs
@@ -0,0 +1,58 @@
+using Microsoft.Extensions.Logging;
+
+namespace MxGateway.Client;
+
+///
+/// Configures the gRPC channel used by the .NET MXAccess Gateway client.
+///
+public sealed class MxGatewayClientOptions
+{
+ public required Uri Endpoint { get; init; }
+
+ public required string ApiKey { get; init; }
+
+ public bool UseTls { get; init; }
+
+ public string? CaCertificatePath { get; init; }
+
+ public string? ServerNameOverride { get; init; }
+
+ public TimeSpan ConnectTimeout { get; init; } = TimeSpan.FromSeconds(10);
+
+ public TimeSpan DefaultCallTimeout { get; init; } = TimeSpan.FromSeconds(30);
+
+ public ILoggerFactory? LoggerFactory { get; init; }
+
+ public void Validate()
+ {
+ ArgumentNullException.ThrowIfNull(Endpoint);
+
+ if (!Endpoint.IsAbsoluteUri)
+ {
+ throw new ArgumentException(
+ "The gateway endpoint must be an absolute URI.",
+ nameof(Endpoint));
+ }
+
+ if (string.IsNullOrWhiteSpace(ApiKey))
+ {
+ throw new ArgumentException(
+ "The gateway API key must not be empty.",
+ nameof(ApiKey));
+ }
+
+ if (ConnectTimeout <= TimeSpan.Zero)
+ {
+ throw new ArgumentOutOfRangeException(
+ nameof(ConnectTimeout),
+ "The connect timeout must be greater than zero.");
+ }
+
+ if (DefaultCallTimeout <= TimeSpan.Zero)
+ {
+ throw new ArgumentOutOfRangeException(
+ nameof(DefaultCallTimeout),
+ "The default call timeout must be greater than zero.");
+ }
+ }
+}
diff --git a/clients/dotnet/README.md b/clients/dotnet/README.md
new file mode 100644
index 0000000..a606185
--- /dev/null
+++ b/clients/dotnet/README.md
@@ -0,0 +1,24 @@
+# .NET Client Projects
+
+The .NET client workspace contains the MXAccess Gateway client library, test
+CLI, and unit tests.
+
+## Projects
+
+| Project | Purpose |
+|---------|---------|
+| `MxGateway.Client` | .NET 10 library entry point and raw gRPC client access. |
+| `MxGateway.Client.Cli` | Test CLI for smoke and diagnostic commands. |
+| `MxGateway.Client.Tests` | Unit tests for the scaffold and generated contract wiring. |
+
+The projects reference `src/MxGateway.Contracts/MxGateway.Contracts.csproj` so
+the client compiles against the same generated protobuf and gRPC types as the
+gateway. `clients/dotnet/generated` remains reserved for generator output if a
+future client build switches to client-local `Grpc.Tools` generation.
+
+## Build And Test
+
+```powershell
+dotnet build clients/dotnet/MxGateway.Client.sln
+dotnet test clients/dotnet/MxGateway.Client.sln --no-build
+```
diff --git a/clients/go/README.md b/clients/go/README.md
new file mode 100644
index 0000000..d0d0fa4
--- /dev/null
+++ b/clients/go/README.md
@@ -0,0 +1,55 @@
+# Go Client
+
+The Go client module contains the generated MXAccess Gateway protobuf bindings,
+a small handwritten `mxgateway` package, and the `mxgw-go` test CLI scaffold.
+The module uses the shared proto inputs documented in
+`../../docs/client-proto-generation.md` so gateway and client contracts stay in
+sync.
+
+## Layout
+
+```text
+clients/go/
+ go.mod
+ generate-proto.ps1
+ internal/generated/
+ mxgateway/
+ cmd/mxgw-go/
+```
+
+`internal/generated` contains code produced by `protoc`, `protoc-gen-go`, and
+`protoc-gen-go-grpc`. Do not edit generated files by hand.
+
+## Regenerating Protobuf Bindings
+
+Run generation after the shared `.proto` files or the Go output path changes:
+
+```powershell
+./generate-proto.ps1
+```
+
+The script uses the tool paths recorded in `../../docs/toolchain-links.md`.
+
+## Build And Test
+
+Run the Go module checks from `clients/go`:
+
+```powershell
+go test ./...
+go build ./...
+```
+
+The scaffold tests parse the shared golden JSON fixtures with the generated Go
+types. Later client implementation tests add fake gRPC services, auth metadata,
+streaming, value conversion, and CLI behavior.
+
+## CLI
+
+The scaffold CLI exposes version information:
+
+```powershell
+go run ./cmd/mxgw-go version -json
+```
+
+Additional commands are implemented with the client/session wrapper work.
+
diff --git a/clients/go/cmd/mxgw-go/main.go b/clients/go/cmd/mxgw-go/main.go
new file mode 100644
index 0000000..bbc21c9
--- /dev/null
+++ b/clients/go/cmd/mxgw-go/main.go
@@ -0,0 +1,63 @@
+package main
+
+import (
+ "encoding/json"
+ "flag"
+ "fmt"
+ "os"
+
+ "gitea.dohertylan.com/dohertj2/mxaccessgw/clients/go/mxgateway"
+)
+
+type versionOutput struct {
+ ClientVersion string `json:"clientVersion"`
+ GatewayProtocolVersion uint32 `json:"gatewayProtocolVersion"`
+ WorkerProtocolVersion uint32 `json:"workerProtocolVersion"`
+}
+
+func main() {
+ if err := run(os.Args[1:]); err != nil {
+ fmt.Fprintln(os.Stderr, err)
+ os.Exit(2)
+ }
+}
+
+func run(args []string) error {
+ if len(args) == 0 {
+ return fmt.Errorf("usage: mxgw-go version [-json]")
+ }
+
+ switch args[0] {
+ case "version":
+ return runVersion(args[1:])
+ default:
+ return fmt.Errorf("unknown command %q", args[0])
+ }
+}
+
+func runVersion(args []string) error {
+ flags := flag.NewFlagSet("version", flag.ContinueOnError)
+ flags.SetOutput(os.Stderr)
+ jsonOutput := flags.Bool("json", false, "write JSON output")
+
+ if err := flags.Parse(args); err != nil {
+ return err
+ }
+
+ output := versionOutput{
+ ClientVersion: mxgateway.ClientVersion,
+ GatewayProtocolVersion: mxgateway.GatewayProtocolVersion,
+ WorkerProtocolVersion: mxgateway.WorkerProtocolVersion,
+ }
+
+ if *jsonOutput {
+ encoder := json.NewEncoder(os.Stdout)
+ encoder.SetIndent("", " ")
+ return encoder.Encode(output)
+ }
+
+ fmt.Fprintf(os.Stdout, "mxgw-go %s\n", output.ClientVersion)
+ fmt.Fprintf(os.Stdout, "gateway protocol %d\n", output.GatewayProtocolVersion)
+ fmt.Fprintf(os.Stdout, "worker protocol %d\n", output.WorkerProtocolVersion)
+ return nil
+}
diff --git a/clients/go/generate-proto.ps1 b/clients/go/generate-proto.ps1
new file mode 100644
index 0000000..076e291
--- /dev/null
+++ b/clients/go/generate-proto.ps1
@@ -0,0 +1,42 @@
+Set-StrictMode -Version Latest
+$ErrorActionPreference = 'Stop'
+
+$repoRoot = Resolve-Path (Join-Path $PSScriptRoot '..\..')
+$protoRoot = Join-Path $repoRoot 'src\MxGateway.Contracts\Protos'
+$outputRoot = Join-Path $PSScriptRoot 'internal\generated'
+$modulePath = 'gitea.dohertylan.com/dohertj2/mxaccessgw/clients/go/internal/generated'
+$protoc = 'C:\Users\dohertj2\AppData\Local\Microsoft\WinGet\Packages\Google.Protobuf_Microsoft.Winget.Source_8wekyb3d8bbwe\bin\protoc.exe'
+$goPluginPath = 'C:\Users\dohertj2\go\bin'
+
+if (-not (Test-Path $protoc)) {
+ throw "protoc was not found at $protoc. See docs/toolchain-links.md."
+}
+
+foreach ($pluginName in @('protoc-gen-go.exe', 'protoc-gen-go-grpc.exe')) {
+ $pluginPath = Join-Path $goPluginPath $pluginName
+ if (-not (Test-Path $pluginPath)) {
+ throw "$pluginName was not found at $pluginPath. See docs/toolchain-links.md."
+ }
+}
+
+New-Item -ItemType Directory -Path $outputRoot -Force | Out-Null
+Get-ChildItem -Path $outputRoot -Filter '*.pb.go' -File | Remove-Item
+
+$env:Path = "$goPluginPath;$env:Path"
+
+& $protoc `
+ --proto_path=$protoRoot `
+ --go_out=$outputRoot `
+ --go_opt=paths=source_relative `
+ "--go_opt=Mmxaccess_gateway.proto=$modulePath;generated" `
+ "--go_opt=Mmxaccess_worker.proto=$modulePath;generated" `
+ mxaccess_gateway.proto `
+ mxaccess_worker.proto
+
+& $protoc `
+ --proto_path=$protoRoot `
+ --go-grpc_out=$outputRoot `
+ --go-grpc_opt=paths=source_relative `
+ "--go-grpc_opt=Mmxaccess_gateway.proto=$modulePath;generated" `
+ mxaccess_gateway.proto
+
diff --git a/clients/go/go.mod b/clients/go/go.mod
new file mode 100644
index 0000000..c8f1e18
--- /dev/null
+++ b/clients/go/go.mod
@@ -0,0 +1,15 @@
+module gitea.dohertylan.com/dohertj2/mxaccessgw/clients/go
+
+go 1.26
+
+require (
+ google.golang.org/grpc v1.80.0
+ google.golang.org/protobuf v1.36.11
+)
+
+require (
+ golang.org/x/net v0.49.0 // indirect
+ golang.org/x/sys v0.40.0 // indirect
+ golang.org/x/text v0.33.0 // indirect
+ google.golang.org/genproto/googleapis/rpc v0.0.0-20260120221211-b8f7ae30c516 // indirect
+)
diff --git a/clients/go/go.sum b/clients/go/go.sum
new file mode 100644
index 0000000..98ff7bd
--- /dev/null
+++ b/clients/go/go.sum
@@ -0,0 +1,38 @@
+github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
+github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
+github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
+github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
+github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
+github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
+github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
+github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
+github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
+github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
+github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
+github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
+go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
+go.opentelemetry.io/otel v1.39.0 h1:8yPrr/S0ND9QEfTfdP9V+SiwT4E0G7Y5MO7p85nis48=
+go.opentelemetry.io/otel v1.39.0/go.mod h1:kLlFTywNWrFyEdH0oj2xK0bFYZtHRYUdv1NklR/tgc8=
+go.opentelemetry.io/otel/metric v1.39.0 h1:d1UzonvEZriVfpNKEVmHXbdf909uGTOQjA0HF0Ls5Q0=
+go.opentelemetry.io/otel/metric v1.39.0/go.mod h1:jrZSWL33sD7bBxg1xjrqyDjnuzTUB0x1nBERXd7Ftcs=
+go.opentelemetry.io/otel/sdk v1.39.0 h1:nMLYcjVsvdui1B/4FRkwjzoRVsMK8uL/cj0OyhKzt18=
+go.opentelemetry.io/otel/sdk v1.39.0/go.mod h1:vDojkC4/jsTJsE+kh+LXYQlbL8CgrEcwmt1ENZszdJE=
+go.opentelemetry.io/otel/sdk/metric v1.39.0 h1:cXMVVFVgsIf2YL6QkRF4Urbr/aMInf+2WKg+sEJTtB8=
+go.opentelemetry.io/otel/sdk/metric v1.39.0/go.mod h1:xq9HEVH7qeX69/JnwEfp6fVq5wosJsY1mt4lLfYdVew=
+go.opentelemetry.io/otel/trace v1.39.0 h1:2d2vfpEDmCJ5zVYz7ijaJdOF59xLomrvj7bjt6/qCJI=
+go.opentelemetry.io/otel/trace v1.39.0/go.mod h1:88w4/PnZSazkGzz/w84VHpQafiU4EtqqlVdxWy+rNOA=
+golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o=
+golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8=
+golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ=
+golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
+golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE=
+golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8=
+gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4=
+gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20260120221211-b8f7ae30c516 h1:sNrWoksmOyF5bvJUcnmbeAmQi8baNhqg5IWaI3llQqU=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20260120221211-b8f7ae30c516/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ=
+google.golang.org/grpc v1.80.0 h1:Xr6m2WmWZLETvUNvIUmeD5OAagMw3FiKmMlTdViWsHM=
+google.golang.org/grpc v1.80.0/go.mod h1:ho/dLnxwi3EDJA4Zghp7k2Ec1+c2jqup0bFkw07bwF4=
+google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
+google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
diff --git a/clients/go/internal/generated/mxaccess_gateway.pb.go b/clients/go/internal/generated/mxaccess_gateway.pb.go
new file mode 100644
index 0000000..f6ee661
--- /dev/null
+++ b/clients/go/internal/generated/mxaccess_gateway.pb.go
@@ -0,0 +1,5480 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.36.11
+// protoc v7.34.1
+// source: mxaccess_gateway.proto
+
+package generated
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ durationpb "google.golang.org/protobuf/types/known/durationpb"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ reflect "reflect"
+ sync "sync"
+ unsafe "unsafe"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type MxCommandKind int32
+
+const (
+ MxCommandKind_MX_COMMAND_KIND_UNSPECIFIED MxCommandKind = 0
+ MxCommandKind_MX_COMMAND_KIND_REGISTER MxCommandKind = 1
+ MxCommandKind_MX_COMMAND_KIND_UNREGISTER MxCommandKind = 2
+ MxCommandKind_MX_COMMAND_KIND_ADD_ITEM MxCommandKind = 3
+ MxCommandKind_MX_COMMAND_KIND_ADD_ITEM2 MxCommandKind = 4
+ MxCommandKind_MX_COMMAND_KIND_REMOVE_ITEM MxCommandKind = 5
+ MxCommandKind_MX_COMMAND_KIND_ADVISE MxCommandKind = 6
+ MxCommandKind_MX_COMMAND_KIND_UN_ADVISE MxCommandKind = 7
+ MxCommandKind_MX_COMMAND_KIND_ADVISE_SUPERVISORY MxCommandKind = 8
+ MxCommandKind_MX_COMMAND_KIND_ADD_BUFFERED_ITEM MxCommandKind = 9
+ MxCommandKind_MX_COMMAND_KIND_SET_BUFFERED_UPDATE_INTERVAL MxCommandKind = 10
+ MxCommandKind_MX_COMMAND_KIND_SUSPEND MxCommandKind = 11
+ MxCommandKind_MX_COMMAND_KIND_ACTIVATE MxCommandKind = 12
+ MxCommandKind_MX_COMMAND_KIND_WRITE MxCommandKind = 13
+ MxCommandKind_MX_COMMAND_KIND_WRITE2 MxCommandKind = 14
+ MxCommandKind_MX_COMMAND_KIND_WRITE_SECURED MxCommandKind = 15
+ MxCommandKind_MX_COMMAND_KIND_WRITE_SECURED2 MxCommandKind = 16
+ MxCommandKind_MX_COMMAND_KIND_AUTHENTICATE_USER MxCommandKind = 17
+ MxCommandKind_MX_COMMAND_KIND_ARCHESTRA_USER_TO_ID MxCommandKind = 18
+ MxCommandKind_MX_COMMAND_KIND_PING MxCommandKind = 100
+ MxCommandKind_MX_COMMAND_KIND_GET_SESSION_STATE MxCommandKind = 101
+ MxCommandKind_MX_COMMAND_KIND_GET_WORKER_INFO MxCommandKind = 102
+ MxCommandKind_MX_COMMAND_KIND_DRAIN_EVENTS MxCommandKind = 103
+ MxCommandKind_MX_COMMAND_KIND_SHUTDOWN_WORKER MxCommandKind = 104
+)
+
+// Enum value maps for MxCommandKind.
+var (
+ MxCommandKind_name = map[int32]string{
+ 0: "MX_COMMAND_KIND_UNSPECIFIED",
+ 1: "MX_COMMAND_KIND_REGISTER",
+ 2: "MX_COMMAND_KIND_UNREGISTER",
+ 3: "MX_COMMAND_KIND_ADD_ITEM",
+ 4: "MX_COMMAND_KIND_ADD_ITEM2",
+ 5: "MX_COMMAND_KIND_REMOVE_ITEM",
+ 6: "MX_COMMAND_KIND_ADVISE",
+ 7: "MX_COMMAND_KIND_UN_ADVISE",
+ 8: "MX_COMMAND_KIND_ADVISE_SUPERVISORY",
+ 9: "MX_COMMAND_KIND_ADD_BUFFERED_ITEM",
+ 10: "MX_COMMAND_KIND_SET_BUFFERED_UPDATE_INTERVAL",
+ 11: "MX_COMMAND_KIND_SUSPEND",
+ 12: "MX_COMMAND_KIND_ACTIVATE",
+ 13: "MX_COMMAND_KIND_WRITE",
+ 14: "MX_COMMAND_KIND_WRITE2",
+ 15: "MX_COMMAND_KIND_WRITE_SECURED",
+ 16: "MX_COMMAND_KIND_WRITE_SECURED2",
+ 17: "MX_COMMAND_KIND_AUTHENTICATE_USER",
+ 18: "MX_COMMAND_KIND_ARCHESTRA_USER_TO_ID",
+ 100: "MX_COMMAND_KIND_PING",
+ 101: "MX_COMMAND_KIND_GET_SESSION_STATE",
+ 102: "MX_COMMAND_KIND_GET_WORKER_INFO",
+ 103: "MX_COMMAND_KIND_DRAIN_EVENTS",
+ 104: "MX_COMMAND_KIND_SHUTDOWN_WORKER",
+ }
+ MxCommandKind_value = map[string]int32{
+ "MX_COMMAND_KIND_UNSPECIFIED": 0,
+ "MX_COMMAND_KIND_REGISTER": 1,
+ "MX_COMMAND_KIND_UNREGISTER": 2,
+ "MX_COMMAND_KIND_ADD_ITEM": 3,
+ "MX_COMMAND_KIND_ADD_ITEM2": 4,
+ "MX_COMMAND_KIND_REMOVE_ITEM": 5,
+ "MX_COMMAND_KIND_ADVISE": 6,
+ "MX_COMMAND_KIND_UN_ADVISE": 7,
+ "MX_COMMAND_KIND_ADVISE_SUPERVISORY": 8,
+ "MX_COMMAND_KIND_ADD_BUFFERED_ITEM": 9,
+ "MX_COMMAND_KIND_SET_BUFFERED_UPDATE_INTERVAL": 10,
+ "MX_COMMAND_KIND_SUSPEND": 11,
+ "MX_COMMAND_KIND_ACTIVATE": 12,
+ "MX_COMMAND_KIND_WRITE": 13,
+ "MX_COMMAND_KIND_WRITE2": 14,
+ "MX_COMMAND_KIND_WRITE_SECURED": 15,
+ "MX_COMMAND_KIND_WRITE_SECURED2": 16,
+ "MX_COMMAND_KIND_AUTHENTICATE_USER": 17,
+ "MX_COMMAND_KIND_ARCHESTRA_USER_TO_ID": 18,
+ "MX_COMMAND_KIND_PING": 100,
+ "MX_COMMAND_KIND_GET_SESSION_STATE": 101,
+ "MX_COMMAND_KIND_GET_WORKER_INFO": 102,
+ "MX_COMMAND_KIND_DRAIN_EVENTS": 103,
+ "MX_COMMAND_KIND_SHUTDOWN_WORKER": 104,
+ }
+)
+
+func (x MxCommandKind) Enum() *MxCommandKind {
+ p := new(MxCommandKind)
+ *p = x
+ return p
+}
+
+func (x MxCommandKind) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (MxCommandKind) Descriptor() protoreflect.EnumDescriptor {
+ return file_mxaccess_gateway_proto_enumTypes[0].Descriptor()
+}
+
+func (MxCommandKind) Type() protoreflect.EnumType {
+ return &file_mxaccess_gateway_proto_enumTypes[0]
+}
+
+func (x MxCommandKind) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use MxCommandKind.Descriptor instead.
+func (MxCommandKind) EnumDescriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{0}
+}
+
+type MxEventFamily int32
+
+const (
+ MxEventFamily_MX_EVENT_FAMILY_UNSPECIFIED MxEventFamily = 0
+ MxEventFamily_MX_EVENT_FAMILY_ON_DATA_CHANGE MxEventFamily = 1
+ MxEventFamily_MX_EVENT_FAMILY_ON_WRITE_COMPLETE MxEventFamily = 2
+ MxEventFamily_MX_EVENT_FAMILY_OPERATION_COMPLETE MxEventFamily = 3
+ MxEventFamily_MX_EVENT_FAMILY_ON_BUFFERED_DATA_CHANGE MxEventFamily = 4
+)
+
+// Enum value maps for MxEventFamily.
+var (
+ MxEventFamily_name = map[int32]string{
+ 0: "MX_EVENT_FAMILY_UNSPECIFIED",
+ 1: "MX_EVENT_FAMILY_ON_DATA_CHANGE",
+ 2: "MX_EVENT_FAMILY_ON_WRITE_COMPLETE",
+ 3: "MX_EVENT_FAMILY_OPERATION_COMPLETE",
+ 4: "MX_EVENT_FAMILY_ON_BUFFERED_DATA_CHANGE",
+ }
+ MxEventFamily_value = map[string]int32{
+ "MX_EVENT_FAMILY_UNSPECIFIED": 0,
+ "MX_EVENT_FAMILY_ON_DATA_CHANGE": 1,
+ "MX_EVENT_FAMILY_ON_WRITE_COMPLETE": 2,
+ "MX_EVENT_FAMILY_OPERATION_COMPLETE": 3,
+ "MX_EVENT_FAMILY_ON_BUFFERED_DATA_CHANGE": 4,
+ }
+)
+
+func (x MxEventFamily) Enum() *MxEventFamily {
+ p := new(MxEventFamily)
+ *p = x
+ return p
+}
+
+func (x MxEventFamily) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (MxEventFamily) Descriptor() protoreflect.EnumDescriptor {
+ return file_mxaccess_gateway_proto_enumTypes[1].Descriptor()
+}
+
+func (MxEventFamily) Type() protoreflect.EnumType {
+ return &file_mxaccess_gateway_proto_enumTypes[1]
+}
+
+func (x MxEventFamily) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use MxEventFamily.Descriptor instead.
+func (MxEventFamily) EnumDescriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{1}
+}
+
+type MxStatusCategory int32
+
+const (
+ MxStatusCategory_MX_STATUS_CATEGORY_UNSPECIFIED MxStatusCategory = 0
+ MxStatusCategory_MX_STATUS_CATEGORY_UNKNOWN MxStatusCategory = 1
+ MxStatusCategory_MX_STATUS_CATEGORY_OK MxStatusCategory = 2
+ MxStatusCategory_MX_STATUS_CATEGORY_PENDING MxStatusCategory = 3
+ MxStatusCategory_MX_STATUS_CATEGORY_WARNING MxStatusCategory = 4
+ MxStatusCategory_MX_STATUS_CATEGORY_COMMUNICATION_ERROR MxStatusCategory = 5
+ MxStatusCategory_MX_STATUS_CATEGORY_CONFIGURATION_ERROR MxStatusCategory = 6
+ MxStatusCategory_MX_STATUS_CATEGORY_OPERATIONAL_ERROR MxStatusCategory = 7
+ MxStatusCategory_MX_STATUS_CATEGORY_SECURITY_ERROR MxStatusCategory = 8
+ MxStatusCategory_MX_STATUS_CATEGORY_SOFTWARE_ERROR MxStatusCategory = 9
+ MxStatusCategory_MX_STATUS_CATEGORY_OTHER_ERROR MxStatusCategory = 10
+)
+
+// Enum value maps for MxStatusCategory.
+var (
+ MxStatusCategory_name = map[int32]string{
+ 0: "MX_STATUS_CATEGORY_UNSPECIFIED",
+ 1: "MX_STATUS_CATEGORY_UNKNOWN",
+ 2: "MX_STATUS_CATEGORY_OK",
+ 3: "MX_STATUS_CATEGORY_PENDING",
+ 4: "MX_STATUS_CATEGORY_WARNING",
+ 5: "MX_STATUS_CATEGORY_COMMUNICATION_ERROR",
+ 6: "MX_STATUS_CATEGORY_CONFIGURATION_ERROR",
+ 7: "MX_STATUS_CATEGORY_OPERATIONAL_ERROR",
+ 8: "MX_STATUS_CATEGORY_SECURITY_ERROR",
+ 9: "MX_STATUS_CATEGORY_SOFTWARE_ERROR",
+ 10: "MX_STATUS_CATEGORY_OTHER_ERROR",
+ }
+ MxStatusCategory_value = map[string]int32{
+ "MX_STATUS_CATEGORY_UNSPECIFIED": 0,
+ "MX_STATUS_CATEGORY_UNKNOWN": 1,
+ "MX_STATUS_CATEGORY_OK": 2,
+ "MX_STATUS_CATEGORY_PENDING": 3,
+ "MX_STATUS_CATEGORY_WARNING": 4,
+ "MX_STATUS_CATEGORY_COMMUNICATION_ERROR": 5,
+ "MX_STATUS_CATEGORY_CONFIGURATION_ERROR": 6,
+ "MX_STATUS_CATEGORY_OPERATIONAL_ERROR": 7,
+ "MX_STATUS_CATEGORY_SECURITY_ERROR": 8,
+ "MX_STATUS_CATEGORY_SOFTWARE_ERROR": 9,
+ "MX_STATUS_CATEGORY_OTHER_ERROR": 10,
+ }
+)
+
+func (x MxStatusCategory) Enum() *MxStatusCategory {
+ p := new(MxStatusCategory)
+ *p = x
+ return p
+}
+
+func (x MxStatusCategory) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (MxStatusCategory) Descriptor() protoreflect.EnumDescriptor {
+ return file_mxaccess_gateway_proto_enumTypes[2].Descriptor()
+}
+
+func (MxStatusCategory) Type() protoreflect.EnumType {
+ return &file_mxaccess_gateway_proto_enumTypes[2]
+}
+
+func (x MxStatusCategory) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use MxStatusCategory.Descriptor instead.
+func (MxStatusCategory) EnumDescriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{2}
+}
+
+type MxStatusSource int32
+
+const (
+ MxStatusSource_MX_STATUS_SOURCE_UNSPECIFIED MxStatusSource = 0
+ MxStatusSource_MX_STATUS_SOURCE_UNKNOWN MxStatusSource = 1
+ MxStatusSource_MX_STATUS_SOURCE_REQUESTING_LMX MxStatusSource = 2
+ MxStatusSource_MX_STATUS_SOURCE_RESPONDING_LMX MxStatusSource = 3
+ MxStatusSource_MX_STATUS_SOURCE_REQUESTING_NMX MxStatusSource = 4
+ MxStatusSource_MX_STATUS_SOURCE_RESPONDING_NMX MxStatusSource = 5
+ MxStatusSource_MX_STATUS_SOURCE_REQUESTING_AUTOMATION_OBJECT MxStatusSource = 6
+ MxStatusSource_MX_STATUS_SOURCE_RESPONDING_AUTOMATION_OBJECT MxStatusSource = 7
+)
+
+// Enum value maps for MxStatusSource.
+var (
+ MxStatusSource_name = map[int32]string{
+ 0: "MX_STATUS_SOURCE_UNSPECIFIED",
+ 1: "MX_STATUS_SOURCE_UNKNOWN",
+ 2: "MX_STATUS_SOURCE_REQUESTING_LMX",
+ 3: "MX_STATUS_SOURCE_RESPONDING_LMX",
+ 4: "MX_STATUS_SOURCE_REQUESTING_NMX",
+ 5: "MX_STATUS_SOURCE_RESPONDING_NMX",
+ 6: "MX_STATUS_SOURCE_REQUESTING_AUTOMATION_OBJECT",
+ 7: "MX_STATUS_SOURCE_RESPONDING_AUTOMATION_OBJECT",
+ }
+ MxStatusSource_value = map[string]int32{
+ "MX_STATUS_SOURCE_UNSPECIFIED": 0,
+ "MX_STATUS_SOURCE_UNKNOWN": 1,
+ "MX_STATUS_SOURCE_REQUESTING_LMX": 2,
+ "MX_STATUS_SOURCE_RESPONDING_LMX": 3,
+ "MX_STATUS_SOURCE_REQUESTING_NMX": 4,
+ "MX_STATUS_SOURCE_RESPONDING_NMX": 5,
+ "MX_STATUS_SOURCE_REQUESTING_AUTOMATION_OBJECT": 6,
+ "MX_STATUS_SOURCE_RESPONDING_AUTOMATION_OBJECT": 7,
+ }
+)
+
+func (x MxStatusSource) Enum() *MxStatusSource {
+ p := new(MxStatusSource)
+ *p = x
+ return p
+}
+
+func (x MxStatusSource) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (MxStatusSource) Descriptor() protoreflect.EnumDescriptor {
+ return file_mxaccess_gateway_proto_enumTypes[3].Descriptor()
+}
+
+func (MxStatusSource) Type() protoreflect.EnumType {
+ return &file_mxaccess_gateway_proto_enumTypes[3]
+}
+
+func (x MxStatusSource) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use MxStatusSource.Descriptor instead.
+func (MxStatusSource) EnumDescriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{3}
+}
+
+type MxDataType int32
+
+const (
+ MxDataType_MX_DATA_TYPE_UNSPECIFIED MxDataType = 0
+ MxDataType_MX_DATA_TYPE_UNKNOWN MxDataType = 1
+ MxDataType_MX_DATA_TYPE_NO_DATA MxDataType = 2
+ MxDataType_MX_DATA_TYPE_BOOLEAN MxDataType = 3
+ MxDataType_MX_DATA_TYPE_INTEGER MxDataType = 4
+ MxDataType_MX_DATA_TYPE_FLOAT MxDataType = 5
+ MxDataType_MX_DATA_TYPE_DOUBLE MxDataType = 6
+ MxDataType_MX_DATA_TYPE_STRING MxDataType = 7
+ MxDataType_MX_DATA_TYPE_TIME MxDataType = 8
+ MxDataType_MX_DATA_TYPE_ELAPSED_TIME MxDataType = 9
+ MxDataType_MX_DATA_TYPE_REFERENCE_TYPE MxDataType = 10
+ MxDataType_MX_DATA_TYPE_STATUS_TYPE MxDataType = 11
+ MxDataType_MX_DATA_TYPE_ENUM MxDataType = 12
+ MxDataType_MX_DATA_TYPE_SECURITY_CLASSIFICATION_ENUM MxDataType = 13
+ MxDataType_MX_DATA_TYPE_DATA_QUALITY_TYPE MxDataType = 14
+ MxDataType_MX_DATA_TYPE_QUALIFIED_ENUM MxDataType = 15
+ MxDataType_MX_DATA_TYPE_QUALIFIED_STRUCT MxDataType = 16
+ MxDataType_MX_DATA_TYPE_INTERNATIONALIZED_STRING MxDataType = 17
+ MxDataType_MX_DATA_TYPE_BIG_STRING MxDataType = 18
+ MxDataType_MX_DATA_TYPE_END MxDataType = 19
+)
+
+// Enum value maps for MxDataType.
+var (
+ MxDataType_name = map[int32]string{
+ 0: "MX_DATA_TYPE_UNSPECIFIED",
+ 1: "MX_DATA_TYPE_UNKNOWN",
+ 2: "MX_DATA_TYPE_NO_DATA",
+ 3: "MX_DATA_TYPE_BOOLEAN",
+ 4: "MX_DATA_TYPE_INTEGER",
+ 5: "MX_DATA_TYPE_FLOAT",
+ 6: "MX_DATA_TYPE_DOUBLE",
+ 7: "MX_DATA_TYPE_STRING",
+ 8: "MX_DATA_TYPE_TIME",
+ 9: "MX_DATA_TYPE_ELAPSED_TIME",
+ 10: "MX_DATA_TYPE_REFERENCE_TYPE",
+ 11: "MX_DATA_TYPE_STATUS_TYPE",
+ 12: "MX_DATA_TYPE_ENUM",
+ 13: "MX_DATA_TYPE_SECURITY_CLASSIFICATION_ENUM",
+ 14: "MX_DATA_TYPE_DATA_QUALITY_TYPE",
+ 15: "MX_DATA_TYPE_QUALIFIED_ENUM",
+ 16: "MX_DATA_TYPE_QUALIFIED_STRUCT",
+ 17: "MX_DATA_TYPE_INTERNATIONALIZED_STRING",
+ 18: "MX_DATA_TYPE_BIG_STRING",
+ 19: "MX_DATA_TYPE_END",
+ }
+ MxDataType_value = map[string]int32{
+ "MX_DATA_TYPE_UNSPECIFIED": 0,
+ "MX_DATA_TYPE_UNKNOWN": 1,
+ "MX_DATA_TYPE_NO_DATA": 2,
+ "MX_DATA_TYPE_BOOLEAN": 3,
+ "MX_DATA_TYPE_INTEGER": 4,
+ "MX_DATA_TYPE_FLOAT": 5,
+ "MX_DATA_TYPE_DOUBLE": 6,
+ "MX_DATA_TYPE_STRING": 7,
+ "MX_DATA_TYPE_TIME": 8,
+ "MX_DATA_TYPE_ELAPSED_TIME": 9,
+ "MX_DATA_TYPE_REFERENCE_TYPE": 10,
+ "MX_DATA_TYPE_STATUS_TYPE": 11,
+ "MX_DATA_TYPE_ENUM": 12,
+ "MX_DATA_TYPE_SECURITY_CLASSIFICATION_ENUM": 13,
+ "MX_DATA_TYPE_DATA_QUALITY_TYPE": 14,
+ "MX_DATA_TYPE_QUALIFIED_ENUM": 15,
+ "MX_DATA_TYPE_QUALIFIED_STRUCT": 16,
+ "MX_DATA_TYPE_INTERNATIONALIZED_STRING": 17,
+ "MX_DATA_TYPE_BIG_STRING": 18,
+ "MX_DATA_TYPE_END": 19,
+ }
+)
+
+func (x MxDataType) Enum() *MxDataType {
+ p := new(MxDataType)
+ *p = x
+ return p
+}
+
+func (x MxDataType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (MxDataType) Descriptor() protoreflect.EnumDescriptor {
+ return file_mxaccess_gateway_proto_enumTypes[4].Descriptor()
+}
+
+func (MxDataType) Type() protoreflect.EnumType {
+ return &file_mxaccess_gateway_proto_enumTypes[4]
+}
+
+func (x MxDataType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use MxDataType.Descriptor instead.
+func (MxDataType) EnumDescriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{4}
+}
+
+type ProtocolStatusCode int32
+
+const (
+ ProtocolStatusCode_PROTOCOL_STATUS_CODE_UNSPECIFIED ProtocolStatusCode = 0
+ ProtocolStatusCode_PROTOCOL_STATUS_CODE_OK ProtocolStatusCode = 1
+ ProtocolStatusCode_PROTOCOL_STATUS_CODE_INVALID_REQUEST ProtocolStatusCode = 2
+ ProtocolStatusCode_PROTOCOL_STATUS_CODE_SESSION_NOT_FOUND ProtocolStatusCode = 3
+ ProtocolStatusCode_PROTOCOL_STATUS_CODE_SESSION_NOT_READY ProtocolStatusCode = 4
+ ProtocolStatusCode_PROTOCOL_STATUS_CODE_WORKER_UNAVAILABLE ProtocolStatusCode = 5
+ ProtocolStatusCode_PROTOCOL_STATUS_CODE_TIMEOUT ProtocolStatusCode = 6
+ ProtocolStatusCode_PROTOCOL_STATUS_CODE_CANCELED ProtocolStatusCode = 7
+ ProtocolStatusCode_PROTOCOL_STATUS_CODE_PROTOCOL_VIOLATION ProtocolStatusCode = 8
+ ProtocolStatusCode_PROTOCOL_STATUS_CODE_MXACCESS_FAILURE ProtocolStatusCode = 9
+)
+
+// Enum value maps for ProtocolStatusCode.
+var (
+ ProtocolStatusCode_name = map[int32]string{
+ 0: "PROTOCOL_STATUS_CODE_UNSPECIFIED",
+ 1: "PROTOCOL_STATUS_CODE_OK",
+ 2: "PROTOCOL_STATUS_CODE_INVALID_REQUEST",
+ 3: "PROTOCOL_STATUS_CODE_SESSION_NOT_FOUND",
+ 4: "PROTOCOL_STATUS_CODE_SESSION_NOT_READY",
+ 5: "PROTOCOL_STATUS_CODE_WORKER_UNAVAILABLE",
+ 6: "PROTOCOL_STATUS_CODE_TIMEOUT",
+ 7: "PROTOCOL_STATUS_CODE_CANCELED",
+ 8: "PROTOCOL_STATUS_CODE_PROTOCOL_VIOLATION",
+ 9: "PROTOCOL_STATUS_CODE_MXACCESS_FAILURE",
+ }
+ ProtocolStatusCode_value = map[string]int32{
+ "PROTOCOL_STATUS_CODE_UNSPECIFIED": 0,
+ "PROTOCOL_STATUS_CODE_OK": 1,
+ "PROTOCOL_STATUS_CODE_INVALID_REQUEST": 2,
+ "PROTOCOL_STATUS_CODE_SESSION_NOT_FOUND": 3,
+ "PROTOCOL_STATUS_CODE_SESSION_NOT_READY": 4,
+ "PROTOCOL_STATUS_CODE_WORKER_UNAVAILABLE": 5,
+ "PROTOCOL_STATUS_CODE_TIMEOUT": 6,
+ "PROTOCOL_STATUS_CODE_CANCELED": 7,
+ "PROTOCOL_STATUS_CODE_PROTOCOL_VIOLATION": 8,
+ "PROTOCOL_STATUS_CODE_MXACCESS_FAILURE": 9,
+ }
+)
+
+func (x ProtocolStatusCode) Enum() *ProtocolStatusCode {
+ p := new(ProtocolStatusCode)
+ *p = x
+ return p
+}
+
+func (x ProtocolStatusCode) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ProtocolStatusCode) Descriptor() protoreflect.EnumDescriptor {
+ return file_mxaccess_gateway_proto_enumTypes[5].Descriptor()
+}
+
+func (ProtocolStatusCode) Type() protoreflect.EnumType {
+ return &file_mxaccess_gateway_proto_enumTypes[5]
+}
+
+func (x ProtocolStatusCode) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use ProtocolStatusCode.Descriptor instead.
+func (ProtocolStatusCode) EnumDescriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{5}
+}
+
+type SessionState int32
+
+const (
+ SessionState_SESSION_STATE_UNSPECIFIED SessionState = 0
+ SessionState_SESSION_STATE_CREATING SessionState = 1
+ SessionState_SESSION_STATE_STARTING_WORKER SessionState = 2
+ SessionState_SESSION_STATE_WAITING_FOR_PIPE SessionState = 3
+ SessionState_SESSION_STATE_HANDSHAKING SessionState = 4
+ SessionState_SESSION_STATE_INITIALIZING_WORKER SessionState = 5
+ SessionState_SESSION_STATE_READY SessionState = 6
+ SessionState_SESSION_STATE_CLOSING SessionState = 7
+ SessionState_SESSION_STATE_CLOSED SessionState = 8
+ SessionState_SESSION_STATE_FAULTED SessionState = 9
+)
+
+// Enum value maps for SessionState.
+var (
+ SessionState_name = map[int32]string{
+ 0: "SESSION_STATE_UNSPECIFIED",
+ 1: "SESSION_STATE_CREATING",
+ 2: "SESSION_STATE_STARTING_WORKER",
+ 3: "SESSION_STATE_WAITING_FOR_PIPE",
+ 4: "SESSION_STATE_HANDSHAKING",
+ 5: "SESSION_STATE_INITIALIZING_WORKER",
+ 6: "SESSION_STATE_READY",
+ 7: "SESSION_STATE_CLOSING",
+ 8: "SESSION_STATE_CLOSED",
+ 9: "SESSION_STATE_FAULTED",
+ }
+ SessionState_value = map[string]int32{
+ "SESSION_STATE_UNSPECIFIED": 0,
+ "SESSION_STATE_CREATING": 1,
+ "SESSION_STATE_STARTING_WORKER": 2,
+ "SESSION_STATE_WAITING_FOR_PIPE": 3,
+ "SESSION_STATE_HANDSHAKING": 4,
+ "SESSION_STATE_INITIALIZING_WORKER": 5,
+ "SESSION_STATE_READY": 6,
+ "SESSION_STATE_CLOSING": 7,
+ "SESSION_STATE_CLOSED": 8,
+ "SESSION_STATE_FAULTED": 9,
+ }
+)
+
+func (x SessionState) Enum() *SessionState {
+ p := new(SessionState)
+ *p = x
+ return p
+}
+
+func (x SessionState) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (SessionState) Descriptor() protoreflect.EnumDescriptor {
+ return file_mxaccess_gateway_proto_enumTypes[6].Descriptor()
+}
+
+func (SessionState) Type() protoreflect.EnumType {
+ return &file_mxaccess_gateway_proto_enumTypes[6]
+}
+
+func (x SessionState) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use SessionState.Descriptor instead.
+func (SessionState) EnumDescriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{6}
+}
+
+type OpenSessionRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ RequestedBackend string `protobuf:"bytes,1,opt,name=requested_backend,json=requestedBackend,proto3" json:"requested_backend,omitempty"`
+ ClientSessionName string `protobuf:"bytes,2,opt,name=client_session_name,json=clientSessionName,proto3" json:"client_session_name,omitempty"`
+ ClientCorrelationId string `protobuf:"bytes,3,opt,name=client_correlation_id,json=clientCorrelationId,proto3" json:"client_correlation_id,omitempty"`
+ CommandTimeout *durationpb.Duration `protobuf:"bytes,4,opt,name=command_timeout,json=commandTimeout,proto3" json:"command_timeout,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *OpenSessionRequest) Reset() {
+ *x = OpenSessionRequest{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *OpenSessionRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*OpenSessionRequest) ProtoMessage() {}
+
+func (x *OpenSessionRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[0]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use OpenSessionRequest.ProtoReflect.Descriptor instead.
+func (*OpenSessionRequest) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *OpenSessionRequest) GetRequestedBackend() string {
+ if x != nil {
+ return x.RequestedBackend
+ }
+ return ""
+}
+
+func (x *OpenSessionRequest) GetClientSessionName() string {
+ if x != nil {
+ return x.ClientSessionName
+ }
+ return ""
+}
+
+func (x *OpenSessionRequest) GetClientCorrelationId() string {
+ if x != nil {
+ return x.ClientCorrelationId
+ }
+ return ""
+}
+
+func (x *OpenSessionRequest) GetCommandTimeout() *durationpb.Duration {
+ if x != nil {
+ return x.CommandTimeout
+ }
+ return nil
+}
+
+type OpenSessionReply struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
+ BackendName string `protobuf:"bytes,2,opt,name=backend_name,json=backendName,proto3" json:"backend_name,omitempty"`
+ WorkerProcessId int32 `protobuf:"varint,3,opt,name=worker_process_id,json=workerProcessId,proto3" json:"worker_process_id,omitempty"`
+ WorkerProtocolVersion uint32 `protobuf:"varint,4,opt,name=worker_protocol_version,json=workerProtocolVersion,proto3" json:"worker_protocol_version,omitempty"`
+ Capabilities []string `protobuf:"bytes,5,rep,name=capabilities,proto3" json:"capabilities,omitempty"`
+ DefaultCommandTimeout *durationpb.Duration `protobuf:"bytes,6,opt,name=default_command_timeout,json=defaultCommandTimeout,proto3" json:"default_command_timeout,omitempty"`
+ ProtocolStatus *ProtocolStatus `protobuf:"bytes,7,opt,name=protocol_status,json=protocolStatus,proto3" json:"protocol_status,omitempty"`
+ // Public gateway contract version implemented by this endpoint. Clients use
+ // this value to reject incompatible generated-code inputs before issuing
+ // command-specific MXAccess calls.
+ GatewayProtocolVersion uint32 `protobuf:"varint,8,opt,name=gateway_protocol_version,json=gatewayProtocolVersion,proto3" json:"gateway_protocol_version,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *OpenSessionReply) Reset() {
+ *x = OpenSessionReply{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *OpenSessionReply) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*OpenSessionReply) ProtoMessage() {}
+
+func (x *OpenSessionReply) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[1]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use OpenSessionReply.ProtoReflect.Descriptor instead.
+func (*OpenSessionReply) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *OpenSessionReply) GetSessionId() string {
+ if x != nil {
+ return x.SessionId
+ }
+ return ""
+}
+
+func (x *OpenSessionReply) GetBackendName() string {
+ if x != nil {
+ return x.BackendName
+ }
+ return ""
+}
+
+func (x *OpenSessionReply) GetWorkerProcessId() int32 {
+ if x != nil {
+ return x.WorkerProcessId
+ }
+ return 0
+}
+
+func (x *OpenSessionReply) GetWorkerProtocolVersion() uint32 {
+ if x != nil {
+ return x.WorkerProtocolVersion
+ }
+ return 0
+}
+
+func (x *OpenSessionReply) GetCapabilities() []string {
+ if x != nil {
+ return x.Capabilities
+ }
+ return nil
+}
+
+func (x *OpenSessionReply) GetDefaultCommandTimeout() *durationpb.Duration {
+ if x != nil {
+ return x.DefaultCommandTimeout
+ }
+ return nil
+}
+
+func (x *OpenSessionReply) GetProtocolStatus() *ProtocolStatus {
+ if x != nil {
+ return x.ProtocolStatus
+ }
+ return nil
+}
+
+func (x *OpenSessionReply) GetGatewayProtocolVersion() uint32 {
+ if x != nil {
+ return x.GatewayProtocolVersion
+ }
+ return 0
+}
+
+type CloseSessionRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
+ ClientCorrelationId string `protobuf:"bytes,2,opt,name=client_correlation_id,json=clientCorrelationId,proto3" json:"client_correlation_id,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *CloseSessionRequest) Reset() {
+ *x = CloseSessionRequest{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *CloseSessionRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CloseSessionRequest) ProtoMessage() {}
+
+func (x *CloseSessionRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[2]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CloseSessionRequest.ProtoReflect.Descriptor instead.
+func (*CloseSessionRequest) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *CloseSessionRequest) GetSessionId() string {
+ if x != nil {
+ return x.SessionId
+ }
+ return ""
+}
+
+func (x *CloseSessionRequest) GetClientCorrelationId() string {
+ if x != nil {
+ return x.ClientCorrelationId
+ }
+ return ""
+}
+
+type CloseSessionReply struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
+ FinalState SessionState `protobuf:"varint,2,opt,name=final_state,json=finalState,proto3,enum=mxaccess_gateway.v1.SessionState" json:"final_state,omitempty"`
+ ProtocolStatus *ProtocolStatus `protobuf:"bytes,3,opt,name=protocol_status,json=protocolStatus,proto3" json:"protocol_status,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *CloseSessionReply) Reset() {
+ *x = CloseSessionReply{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *CloseSessionReply) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CloseSessionReply) ProtoMessage() {}
+
+func (x *CloseSessionReply) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[3]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CloseSessionReply.ProtoReflect.Descriptor instead.
+func (*CloseSessionReply) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *CloseSessionReply) GetSessionId() string {
+ if x != nil {
+ return x.SessionId
+ }
+ return ""
+}
+
+func (x *CloseSessionReply) GetFinalState() SessionState {
+ if x != nil {
+ return x.FinalState
+ }
+ return SessionState_SESSION_STATE_UNSPECIFIED
+}
+
+func (x *CloseSessionReply) GetProtocolStatus() *ProtocolStatus {
+ if x != nil {
+ return x.ProtocolStatus
+ }
+ return nil
+}
+
+type StreamEventsRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
+ AfterWorkerSequence uint64 `protobuf:"varint,2,opt,name=after_worker_sequence,json=afterWorkerSequence,proto3" json:"after_worker_sequence,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *StreamEventsRequest) Reset() {
+ *x = StreamEventsRequest{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *StreamEventsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StreamEventsRequest) ProtoMessage() {}
+
+func (x *StreamEventsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[4]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use StreamEventsRequest.ProtoReflect.Descriptor instead.
+func (*StreamEventsRequest) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *StreamEventsRequest) GetSessionId() string {
+ if x != nil {
+ return x.SessionId
+ }
+ return ""
+}
+
+func (x *StreamEventsRequest) GetAfterWorkerSequence() uint64 {
+ if x != nil {
+ return x.AfterWorkerSequence
+ }
+ return 0
+}
+
+type MxCommandRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
+ ClientCorrelationId string `protobuf:"bytes,2,opt,name=client_correlation_id,json=clientCorrelationId,proto3" json:"client_correlation_id,omitempty"`
+ Command *MxCommand `protobuf:"bytes,3,opt,name=command,proto3" json:"command,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *MxCommandRequest) Reset() {
+ *x = MxCommandRequest{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *MxCommandRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MxCommandRequest) ProtoMessage() {}
+
+func (x *MxCommandRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[5]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MxCommandRequest.ProtoReflect.Descriptor instead.
+func (*MxCommandRequest) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *MxCommandRequest) GetSessionId() string {
+ if x != nil {
+ return x.SessionId
+ }
+ return ""
+}
+
+func (x *MxCommandRequest) GetClientCorrelationId() string {
+ if x != nil {
+ return x.ClientCorrelationId
+ }
+ return ""
+}
+
+func (x *MxCommandRequest) GetCommand() *MxCommand {
+ if x != nil {
+ return x.Command
+ }
+ return nil
+}
+
+type MxCommand struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Kind MxCommandKind `protobuf:"varint,1,opt,name=kind,proto3,enum=mxaccess_gateway.v1.MxCommandKind" json:"kind,omitempty"`
+ // Types that are valid to be assigned to Payload:
+ //
+ // *MxCommand_Register
+ // *MxCommand_Unregister
+ // *MxCommand_AddItem
+ // *MxCommand_AddItem2
+ // *MxCommand_RemoveItem
+ // *MxCommand_Advise
+ // *MxCommand_UnAdvise
+ // *MxCommand_AdviseSupervisory
+ // *MxCommand_AddBufferedItem
+ // *MxCommand_SetBufferedUpdateInterval
+ // *MxCommand_Suspend
+ // *MxCommand_Activate
+ // *MxCommand_Write
+ // *MxCommand_Write2
+ // *MxCommand_WriteSecured
+ // *MxCommand_WriteSecured2
+ // *MxCommand_AuthenticateUser
+ // *MxCommand_ArchestraUserToId
+ // *MxCommand_Ping
+ // *MxCommand_GetSessionState
+ // *MxCommand_GetWorkerInfo
+ // *MxCommand_DrainEvents
+ // *MxCommand_ShutdownWorker
+ Payload isMxCommand_Payload `protobuf_oneof:"payload"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *MxCommand) Reset() {
+ *x = MxCommand{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *MxCommand) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MxCommand) ProtoMessage() {}
+
+func (x *MxCommand) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[6]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MxCommand.ProtoReflect.Descriptor instead.
+func (*MxCommand) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *MxCommand) GetKind() MxCommandKind {
+ if x != nil {
+ return x.Kind
+ }
+ return MxCommandKind_MX_COMMAND_KIND_UNSPECIFIED
+}
+
+func (x *MxCommand) GetPayload() isMxCommand_Payload {
+ if x != nil {
+ return x.Payload
+ }
+ return nil
+}
+
+func (x *MxCommand) GetRegister() *RegisterCommand {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommand_Register); ok {
+ return x.Register
+ }
+ }
+ return nil
+}
+
+func (x *MxCommand) GetUnregister() *UnregisterCommand {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommand_Unregister); ok {
+ return x.Unregister
+ }
+ }
+ return nil
+}
+
+func (x *MxCommand) GetAddItem() *AddItemCommand {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommand_AddItem); ok {
+ return x.AddItem
+ }
+ }
+ return nil
+}
+
+func (x *MxCommand) GetAddItem2() *AddItem2Command {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommand_AddItem2); ok {
+ return x.AddItem2
+ }
+ }
+ return nil
+}
+
+func (x *MxCommand) GetRemoveItem() *RemoveItemCommand {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommand_RemoveItem); ok {
+ return x.RemoveItem
+ }
+ }
+ return nil
+}
+
+func (x *MxCommand) GetAdvise() *AdviseCommand {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommand_Advise); ok {
+ return x.Advise
+ }
+ }
+ return nil
+}
+
+func (x *MxCommand) GetUnAdvise() *UnAdviseCommand {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommand_UnAdvise); ok {
+ return x.UnAdvise
+ }
+ }
+ return nil
+}
+
+func (x *MxCommand) GetAdviseSupervisory() *AdviseSupervisoryCommand {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommand_AdviseSupervisory); ok {
+ return x.AdviseSupervisory
+ }
+ }
+ return nil
+}
+
+func (x *MxCommand) GetAddBufferedItem() *AddBufferedItemCommand {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommand_AddBufferedItem); ok {
+ return x.AddBufferedItem
+ }
+ }
+ return nil
+}
+
+func (x *MxCommand) GetSetBufferedUpdateInterval() *SetBufferedUpdateIntervalCommand {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommand_SetBufferedUpdateInterval); ok {
+ return x.SetBufferedUpdateInterval
+ }
+ }
+ return nil
+}
+
+func (x *MxCommand) GetSuspend() *SuspendCommand {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommand_Suspend); ok {
+ return x.Suspend
+ }
+ }
+ return nil
+}
+
+func (x *MxCommand) GetActivate() *ActivateCommand {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommand_Activate); ok {
+ return x.Activate
+ }
+ }
+ return nil
+}
+
+func (x *MxCommand) GetWrite() *WriteCommand {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommand_Write); ok {
+ return x.Write
+ }
+ }
+ return nil
+}
+
+func (x *MxCommand) GetWrite2() *Write2Command {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommand_Write2); ok {
+ return x.Write2
+ }
+ }
+ return nil
+}
+
+func (x *MxCommand) GetWriteSecured() *WriteSecuredCommand {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommand_WriteSecured); ok {
+ return x.WriteSecured
+ }
+ }
+ return nil
+}
+
+func (x *MxCommand) GetWriteSecured2() *WriteSecured2Command {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommand_WriteSecured2); ok {
+ return x.WriteSecured2
+ }
+ }
+ return nil
+}
+
+func (x *MxCommand) GetAuthenticateUser() *AuthenticateUserCommand {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommand_AuthenticateUser); ok {
+ return x.AuthenticateUser
+ }
+ }
+ return nil
+}
+
+func (x *MxCommand) GetArchestraUserToId() *ArchestrAUserToIdCommand {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommand_ArchestraUserToId); ok {
+ return x.ArchestraUserToId
+ }
+ }
+ return nil
+}
+
+func (x *MxCommand) GetPing() *PingCommand {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommand_Ping); ok {
+ return x.Ping
+ }
+ }
+ return nil
+}
+
+func (x *MxCommand) GetGetSessionState() *GetSessionStateCommand {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommand_GetSessionState); ok {
+ return x.GetSessionState
+ }
+ }
+ return nil
+}
+
+func (x *MxCommand) GetGetWorkerInfo() *GetWorkerInfoCommand {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommand_GetWorkerInfo); ok {
+ return x.GetWorkerInfo
+ }
+ }
+ return nil
+}
+
+func (x *MxCommand) GetDrainEvents() *DrainEventsCommand {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommand_DrainEvents); ok {
+ return x.DrainEvents
+ }
+ }
+ return nil
+}
+
+func (x *MxCommand) GetShutdownWorker() *ShutdownWorkerCommand {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommand_ShutdownWorker); ok {
+ return x.ShutdownWorker
+ }
+ }
+ return nil
+}
+
+type isMxCommand_Payload interface {
+ isMxCommand_Payload()
+}
+
+type MxCommand_Register struct {
+ Register *RegisterCommand `protobuf:"bytes,10,opt,name=register,proto3,oneof"`
+}
+
+type MxCommand_Unregister struct {
+ Unregister *UnregisterCommand `protobuf:"bytes,11,opt,name=unregister,proto3,oneof"`
+}
+
+type MxCommand_AddItem struct {
+ AddItem *AddItemCommand `protobuf:"bytes,12,opt,name=add_item,json=addItem,proto3,oneof"`
+}
+
+type MxCommand_AddItem2 struct {
+ AddItem2 *AddItem2Command `protobuf:"bytes,13,opt,name=add_item2,json=addItem2,proto3,oneof"`
+}
+
+type MxCommand_RemoveItem struct {
+ RemoveItem *RemoveItemCommand `protobuf:"bytes,14,opt,name=remove_item,json=removeItem,proto3,oneof"`
+}
+
+type MxCommand_Advise struct {
+ Advise *AdviseCommand `protobuf:"bytes,15,opt,name=advise,proto3,oneof"`
+}
+
+type MxCommand_UnAdvise struct {
+ UnAdvise *UnAdviseCommand `protobuf:"bytes,16,opt,name=un_advise,json=unAdvise,proto3,oneof"`
+}
+
+type MxCommand_AdviseSupervisory struct {
+ AdviseSupervisory *AdviseSupervisoryCommand `protobuf:"bytes,17,opt,name=advise_supervisory,json=adviseSupervisory,proto3,oneof"`
+}
+
+type MxCommand_AddBufferedItem struct {
+ AddBufferedItem *AddBufferedItemCommand `protobuf:"bytes,18,opt,name=add_buffered_item,json=addBufferedItem,proto3,oneof"`
+}
+
+type MxCommand_SetBufferedUpdateInterval struct {
+ SetBufferedUpdateInterval *SetBufferedUpdateIntervalCommand `protobuf:"bytes,19,opt,name=set_buffered_update_interval,json=setBufferedUpdateInterval,proto3,oneof"`
+}
+
+type MxCommand_Suspend struct {
+ Suspend *SuspendCommand `protobuf:"bytes,20,opt,name=suspend,proto3,oneof"`
+}
+
+type MxCommand_Activate struct {
+ Activate *ActivateCommand `protobuf:"bytes,21,opt,name=activate,proto3,oneof"`
+}
+
+type MxCommand_Write struct {
+ Write *WriteCommand `protobuf:"bytes,22,opt,name=write,proto3,oneof"`
+}
+
+type MxCommand_Write2 struct {
+ Write2 *Write2Command `protobuf:"bytes,23,opt,name=write2,proto3,oneof"`
+}
+
+type MxCommand_WriteSecured struct {
+ WriteSecured *WriteSecuredCommand `protobuf:"bytes,24,opt,name=write_secured,json=writeSecured,proto3,oneof"`
+}
+
+type MxCommand_WriteSecured2 struct {
+ WriteSecured2 *WriteSecured2Command `protobuf:"bytes,25,opt,name=write_secured2,json=writeSecured2,proto3,oneof"`
+}
+
+type MxCommand_AuthenticateUser struct {
+ AuthenticateUser *AuthenticateUserCommand `protobuf:"bytes,26,opt,name=authenticate_user,json=authenticateUser,proto3,oneof"`
+}
+
+type MxCommand_ArchestraUserToId struct {
+ ArchestraUserToId *ArchestrAUserToIdCommand `protobuf:"bytes,27,opt,name=archestra_user_to_id,json=archestraUserToId,proto3,oneof"`
+}
+
+type MxCommand_Ping struct {
+ Ping *PingCommand `protobuf:"bytes,100,opt,name=ping,proto3,oneof"`
+}
+
+type MxCommand_GetSessionState struct {
+ GetSessionState *GetSessionStateCommand `protobuf:"bytes,101,opt,name=get_session_state,json=getSessionState,proto3,oneof"`
+}
+
+type MxCommand_GetWorkerInfo struct {
+ GetWorkerInfo *GetWorkerInfoCommand `protobuf:"bytes,102,opt,name=get_worker_info,json=getWorkerInfo,proto3,oneof"`
+}
+
+type MxCommand_DrainEvents struct {
+ DrainEvents *DrainEventsCommand `protobuf:"bytes,103,opt,name=drain_events,json=drainEvents,proto3,oneof"`
+}
+
+type MxCommand_ShutdownWorker struct {
+ ShutdownWorker *ShutdownWorkerCommand `protobuf:"bytes,104,opt,name=shutdown_worker,json=shutdownWorker,proto3,oneof"`
+}
+
+func (*MxCommand_Register) isMxCommand_Payload() {}
+
+func (*MxCommand_Unregister) isMxCommand_Payload() {}
+
+func (*MxCommand_AddItem) isMxCommand_Payload() {}
+
+func (*MxCommand_AddItem2) isMxCommand_Payload() {}
+
+func (*MxCommand_RemoveItem) isMxCommand_Payload() {}
+
+func (*MxCommand_Advise) isMxCommand_Payload() {}
+
+func (*MxCommand_UnAdvise) isMxCommand_Payload() {}
+
+func (*MxCommand_AdviseSupervisory) isMxCommand_Payload() {}
+
+func (*MxCommand_AddBufferedItem) isMxCommand_Payload() {}
+
+func (*MxCommand_SetBufferedUpdateInterval) isMxCommand_Payload() {}
+
+func (*MxCommand_Suspend) isMxCommand_Payload() {}
+
+func (*MxCommand_Activate) isMxCommand_Payload() {}
+
+func (*MxCommand_Write) isMxCommand_Payload() {}
+
+func (*MxCommand_Write2) isMxCommand_Payload() {}
+
+func (*MxCommand_WriteSecured) isMxCommand_Payload() {}
+
+func (*MxCommand_WriteSecured2) isMxCommand_Payload() {}
+
+func (*MxCommand_AuthenticateUser) isMxCommand_Payload() {}
+
+func (*MxCommand_ArchestraUserToId) isMxCommand_Payload() {}
+
+func (*MxCommand_Ping) isMxCommand_Payload() {}
+
+func (*MxCommand_GetSessionState) isMxCommand_Payload() {}
+
+func (*MxCommand_GetWorkerInfo) isMxCommand_Payload() {}
+
+func (*MxCommand_DrainEvents) isMxCommand_Payload() {}
+
+func (*MxCommand_ShutdownWorker) isMxCommand_Payload() {}
+
+type RegisterCommand struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ClientName string `protobuf:"bytes,1,opt,name=client_name,json=clientName,proto3" json:"client_name,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *RegisterCommand) Reset() {
+ *x = RegisterCommand{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *RegisterCommand) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RegisterCommand) ProtoMessage() {}
+
+func (x *RegisterCommand) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[7]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RegisterCommand.ProtoReflect.Descriptor instead.
+func (*RegisterCommand) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *RegisterCommand) GetClientName() string {
+ if x != nil {
+ return x.ClientName
+ }
+ return ""
+}
+
+type UnregisterCommand struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ServerHandle int32 `protobuf:"varint,1,opt,name=server_handle,json=serverHandle,proto3" json:"server_handle,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *UnregisterCommand) Reset() {
+ *x = UnregisterCommand{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *UnregisterCommand) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UnregisterCommand) ProtoMessage() {}
+
+func (x *UnregisterCommand) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[8]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UnregisterCommand.ProtoReflect.Descriptor instead.
+func (*UnregisterCommand) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *UnregisterCommand) GetServerHandle() int32 {
+ if x != nil {
+ return x.ServerHandle
+ }
+ return 0
+}
+
+type AddItemCommand struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ServerHandle int32 `protobuf:"varint,1,opt,name=server_handle,json=serverHandle,proto3" json:"server_handle,omitempty"`
+ ItemDefinition string `protobuf:"bytes,2,opt,name=item_definition,json=itemDefinition,proto3" json:"item_definition,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *AddItemCommand) Reset() {
+ *x = AddItemCommand{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *AddItemCommand) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AddItemCommand) ProtoMessage() {}
+
+func (x *AddItemCommand) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[9]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use AddItemCommand.ProtoReflect.Descriptor instead.
+func (*AddItemCommand) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *AddItemCommand) GetServerHandle() int32 {
+ if x != nil {
+ return x.ServerHandle
+ }
+ return 0
+}
+
+func (x *AddItemCommand) GetItemDefinition() string {
+ if x != nil {
+ return x.ItemDefinition
+ }
+ return ""
+}
+
+type AddItem2Command struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ServerHandle int32 `protobuf:"varint,1,opt,name=server_handle,json=serverHandle,proto3" json:"server_handle,omitempty"`
+ ItemDefinition string `protobuf:"bytes,2,opt,name=item_definition,json=itemDefinition,proto3" json:"item_definition,omitempty"`
+ ItemContext string `protobuf:"bytes,3,opt,name=item_context,json=itemContext,proto3" json:"item_context,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *AddItem2Command) Reset() {
+ *x = AddItem2Command{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *AddItem2Command) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AddItem2Command) ProtoMessage() {}
+
+func (x *AddItem2Command) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[10]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use AddItem2Command.ProtoReflect.Descriptor instead.
+func (*AddItem2Command) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *AddItem2Command) GetServerHandle() int32 {
+ if x != nil {
+ return x.ServerHandle
+ }
+ return 0
+}
+
+func (x *AddItem2Command) GetItemDefinition() string {
+ if x != nil {
+ return x.ItemDefinition
+ }
+ return ""
+}
+
+func (x *AddItem2Command) GetItemContext() string {
+ if x != nil {
+ return x.ItemContext
+ }
+ return ""
+}
+
+type RemoveItemCommand struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ServerHandle int32 `protobuf:"varint,1,opt,name=server_handle,json=serverHandle,proto3" json:"server_handle,omitempty"`
+ ItemHandle int32 `protobuf:"varint,2,opt,name=item_handle,json=itemHandle,proto3" json:"item_handle,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *RemoveItemCommand) Reset() {
+ *x = RemoveItemCommand{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *RemoveItemCommand) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RemoveItemCommand) ProtoMessage() {}
+
+func (x *RemoveItemCommand) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[11]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RemoveItemCommand.ProtoReflect.Descriptor instead.
+func (*RemoveItemCommand) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{11}
+}
+
+func (x *RemoveItemCommand) GetServerHandle() int32 {
+ if x != nil {
+ return x.ServerHandle
+ }
+ return 0
+}
+
+func (x *RemoveItemCommand) GetItemHandle() int32 {
+ if x != nil {
+ return x.ItemHandle
+ }
+ return 0
+}
+
+type AdviseCommand struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ServerHandle int32 `protobuf:"varint,1,opt,name=server_handle,json=serverHandle,proto3" json:"server_handle,omitempty"`
+ ItemHandle int32 `protobuf:"varint,2,opt,name=item_handle,json=itemHandle,proto3" json:"item_handle,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *AdviseCommand) Reset() {
+ *x = AdviseCommand{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *AdviseCommand) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AdviseCommand) ProtoMessage() {}
+
+func (x *AdviseCommand) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[12]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use AdviseCommand.ProtoReflect.Descriptor instead.
+func (*AdviseCommand) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{12}
+}
+
+func (x *AdviseCommand) GetServerHandle() int32 {
+ if x != nil {
+ return x.ServerHandle
+ }
+ return 0
+}
+
+func (x *AdviseCommand) GetItemHandle() int32 {
+ if x != nil {
+ return x.ItemHandle
+ }
+ return 0
+}
+
+type UnAdviseCommand struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ServerHandle int32 `protobuf:"varint,1,opt,name=server_handle,json=serverHandle,proto3" json:"server_handle,omitempty"`
+ ItemHandle int32 `protobuf:"varint,2,opt,name=item_handle,json=itemHandle,proto3" json:"item_handle,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *UnAdviseCommand) Reset() {
+ *x = UnAdviseCommand{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *UnAdviseCommand) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UnAdviseCommand) ProtoMessage() {}
+
+func (x *UnAdviseCommand) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[13]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UnAdviseCommand.ProtoReflect.Descriptor instead.
+func (*UnAdviseCommand) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{13}
+}
+
+func (x *UnAdviseCommand) GetServerHandle() int32 {
+ if x != nil {
+ return x.ServerHandle
+ }
+ return 0
+}
+
+func (x *UnAdviseCommand) GetItemHandle() int32 {
+ if x != nil {
+ return x.ItemHandle
+ }
+ return 0
+}
+
+type AdviseSupervisoryCommand struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ServerHandle int32 `protobuf:"varint,1,opt,name=server_handle,json=serverHandle,proto3" json:"server_handle,omitempty"`
+ ItemHandle int32 `protobuf:"varint,2,opt,name=item_handle,json=itemHandle,proto3" json:"item_handle,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *AdviseSupervisoryCommand) Reset() {
+ *x = AdviseSupervisoryCommand{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *AdviseSupervisoryCommand) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AdviseSupervisoryCommand) ProtoMessage() {}
+
+func (x *AdviseSupervisoryCommand) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[14]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use AdviseSupervisoryCommand.ProtoReflect.Descriptor instead.
+func (*AdviseSupervisoryCommand) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{14}
+}
+
+func (x *AdviseSupervisoryCommand) GetServerHandle() int32 {
+ if x != nil {
+ return x.ServerHandle
+ }
+ return 0
+}
+
+func (x *AdviseSupervisoryCommand) GetItemHandle() int32 {
+ if x != nil {
+ return x.ItemHandle
+ }
+ return 0
+}
+
+type AddBufferedItemCommand struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ServerHandle int32 `protobuf:"varint,1,opt,name=server_handle,json=serverHandle,proto3" json:"server_handle,omitempty"`
+ ItemDefinition string `protobuf:"bytes,2,opt,name=item_definition,json=itemDefinition,proto3" json:"item_definition,omitempty"`
+ ItemContext string `protobuf:"bytes,3,opt,name=item_context,json=itemContext,proto3" json:"item_context,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *AddBufferedItemCommand) Reset() {
+ *x = AddBufferedItemCommand{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *AddBufferedItemCommand) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AddBufferedItemCommand) ProtoMessage() {}
+
+func (x *AddBufferedItemCommand) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[15]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use AddBufferedItemCommand.ProtoReflect.Descriptor instead.
+func (*AddBufferedItemCommand) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{15}
+}
+
+func (x *AddBufferedItemCommand) GetServerHandle() int32 {
+ if x != nil {
+ return x.ServerHandle
+ }
+ return 0
+}
+
+func (x *AddBufferedItemCommand) GetItemDefinition() string {
+ if x != nil {
+ return x.ItemDefinition
+ }
+ return ""
+}
+
+func (x *AddBufferedItemCommand) GetItemContext() string {
+ if x != nil {
+ return x.ItemContext
+ }
+ return ""
+}
+
+type SetBufferedUpdateIntervalCommand struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ServerHandle int32 `protobuf:"varint,1,opt,name=server_handle,json=serverHandle,proto3" json:"server_handle,omitempty"`
+ UpdateIntervalMilliseconds int32 `protobuf:"varint,2,opt,name=update_interval_milliseconds,json=updateIntervalMilliseconds,proto3" json:"update_interval_milliseconds,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *SetBufferedUpdateIntervalCommand) Reset() {
+ *x = SetBufferedUpdateIntervalCommand{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[16]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *SetBufferedUpdateIntervalCommand) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SetBufferedUpdateIntervalCommand) ProtoMessage() {}
+
+func (x *SetBufferedUpdateIntervalCommand) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[16]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SetBufferedUpdateIntervalCommand.ProtoReflect.Descriptor instead.
+func (*SetBufferedUpdateIntervalCommand) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{16}
+}
+
+func (x *SetBufferedUpdateIntervalCommand) GetServerHandle() int32 {
+ if x != nil {
+ return x.ServerHandle
+ }
+ return 0
+}
+
+func (x *SetBufferedUpdateIntervalCommand) GetUpdateIntervalMilliseconds() int32 {
+ if x != nil {
+ return x.UpdateIntervalMilliseconds
+ }
+ return 0
+}
+
+type SuspendCommand struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ServerHandle int32 `protobuf:"varint,1,opt,name=server_handle,json=serverHandle,proto3" json:"server_handle,omitempty"`
+ ItemHandle int32 `protobuf:"varint,2,opt,name=item_handle,json=itemHandle,proto3" json:"item_handle,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *SuspendCommand) Reset() {
+ *x = SuspendCommand{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[17]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *SuspendCommand) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SuspendCommand) ProtoMessage() {}
+
+func (x *SuspendCommand) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[17]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SuspendCommand.ProtoReflect.Descriptor instead.
+func (*SuspendCommand) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{17}
+}
+
+func (x *SuspendCommand) GetServerHandle() int32 {
+ if x != nil {
+ return x.ServerHandle
+ }
+ return 0
+}
+
+func (x *SuspendCommand) GetItemHandle() int32 {
+ if x != nil {
+ return x.ItemHandle
+ }
+ return 0
+}
+
+type ActivateCommand struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ServerHandle int32 `protobuf:"varint,1,opt,name=server_handle,json=serverHandle,proto3" json:"server_handle,omitempty"`
+ ItemHandle int32 `protobuf:"varint,2,opt,name=item_handle,json=itemHandle,proto3" json:"item_handle,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ActivateCommand) Reset() {
+ *x = ActivateCommand{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[18]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ActivateCommand) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ActivateCommand) ProtoMessage() {}
+
+func (x *ActivateCommand) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[18]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ActivateCommand.ProtoReflect.Descriptor instead.
+func (*ActivateCommand) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{18}
+}
+
+func (x *ActivateCommand) GetServerHandle() int32 {
+ if x != nil {
+ return x.ServerHandle
+ }
+ return 0
+}
+
+func (x *ActivateCommand) GetItemHandle() int32 {
+ if x != nil {
+ return x.ItemHandle
+ }
+ return 0
+}
+
+type WriteCommand struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ServerHandle int32 `protobuf:"varint,1,opt,name=server_handle,json=serverHandle,proto3" json:"server_handle,omitempty"`
+ ItemHandle int32 `protobuf:"varint,2,opt,name=item_handle,json=itemHandle,proto3" json:"item_handle,omitempty"`
+ Value *MxValue `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
+ UserId int32 `protobuf:"varint,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *WriteCommand) Reset() {
+ *x = WriteCommand{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[19]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *WriteCommand) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WriteCommand) ProtoMessage() {}
+
+func (x *WriteCommand) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[19]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use WriteCommand.ProtoReflect.Descriptor instead.
+func (*WriteCommand) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{19}
+}
+
+func (x *WriteCommand) GetServerHandle() int32 {
+ if x != nil {
+ return x.ServerHandle
+ }
+ return 0
+}
+
+func (x *WriteCommand) GetItemHandle() int32 {
+ if x != nil {
+ return x.ItemHandle
+ }
+ return 0
+}
+
+func (x *WriteCommand) GetValue() *MxValue {
+ if x != nil {
+ return x.Value
+ }
+ return nil
+}
+
+func (x *WriteCommand) GetUserId() int32 {
+ if x != nil {
+ return x.UserId
+ }
+ return 0
+}
+
+type Write2Command struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ServerHandle int32 `protobuf:"varint,1,opt,name=server_handle,json=serverHandle,proto3" json:"server_handle,omitempty"`
+ ItemHandle int32 `protobuf:"varint,2,opt,name=item_handle,json=itemHandle,proto3" json:"item_handle,omitempty"`
+ Value *MxValue `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
+ TimestampValue *MxValue `protobuf:"bytes,4,opt,name=timestamp_value,json=timestampValue,proto3" json:"timestamp_value,omitempty"`
+ UserId int32 `protobuf:"varint,5,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Write2Command) Reset() {
+ *x = Write2Command{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[20]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Write2Command) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Write2Command) ProtoMessage() {}
+
+func (x *Write2Command) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[20]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Write2Command.ProtoReflect.Descriptor instead.
+func (*Write2Command) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{20}
+}
+
+func (x *Write2Command) GetServerHandle() int32 {
+ if x != nil {
+ return x.ServerHandle
+ }
+ return 0
+}
+
+func (x *Write2Command) GetItemHandle() int32 {
+ if x != nil {
+ return x.ItemHandle
+ }
+ return 0
+}
+
+func (x *Write2Command) GetValue() *MxValue {
+ if x != nil {
+ return x.Value
+ }
+ return nil
+}
+
+func (x *Write2Command) GetTimestampValue() *MxValue {
+ if x != nil {
+ return x.TimestampValue
+ }
+ return nil
+}
+
+func (x *Write2Command) GetUserId() int32 {
+ if x != nil {
+ return x.UserId
+ }
+ return 0
+}
+
+type WriteSecuredCommand struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ServerHandle int32 `protobuf:"varint,1,opt,name=server_handle,json=serverHandle,proto3" json:"server_handle,omitempty"`
+ ItemHandle int32 `protobuf:"varint,2,opt,name=item_handle,json=itemHandle,proto3" json:"item_handle,omitempty"`
+ CurrentUserId int32 `protobuf:"varint,3,opt,name=current_user_id,json=currentUserId,proto3" json:"current_user_id,omitempty"`
+ VerifierUserId int32 `protobuf:"varint,4,opt,name=verifier_user_id,json=verifierUserId,proto3" json:"verifier_user_id,omitempty"`
+ // Credential-sensitive write value. Implementations must not log this field
+ // unless an explicit redacted value-logging path is enabled.
+ Value *MxValue `protobuf:"bytes,5,opt,name=value,proto3" json:"value,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *WriteSecuredCommand) Reset() {
+ *x = WriteSecuredCommand{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[21]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *WriteSecuredCommand) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WriteSecuredCommand) ProtoMessage() {}
+
+func (x *WriteSecuredCommand) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[21]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use WriteSecuredCommand.ProtoReflect.Descriptor instead.
+func (*WriteSecuredCommand) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{21}
+}
+
+func (x *WriteSecuredCommand) GetServerHandle() int32 {
+ if x != nil {
+ return x.ServerHandle
+ }
+ return 0
+}
+
+func (x *WriteSecuredCommand) GetItemHandle() int32 {
+ if x != nil {
+ return x.ItemHandle
+ }
+ return 0
+}
+
+func (x *WriteSecuredCommand) GetCurrentUserId() int32 {
+ if x != nil {
+ return x.CurrentUserId
+ }
+ return 0
+}
+
+func (x *WriteSecuredCommand) GetVerifierUserId() int32 {
+ if x != nil {
+ return x.VerifierUserId
+ }
+ return 0
+}
+
+func (x *WriteSecuredCommand) GetValue() *MxValue {
+ if x != nil {
+ return x.Value
+ }
+ return nil
+}
+
+type WriteSecured2Command struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ServerHandle int32 `protobuf:"varint,1,opt,name=server_handle,json=serverHandle,proto3" json:"server_handle,omitempty"`
+ ItemHandle int32 `protobuf:"varint,2,opt,name=item_handle,json=itemHandle,proto3" json:"item_handle,omitempty"`
+ CurrentUserId int32 `protobuf:"varint,3,opt,name=current_user_id,json=currentUserId,proto3" json:"current_user_id,omitempty"`
+ VerifierUserId int32 `protobuf:"varint,4,opt,name=verifier_user_id,json=verifierUserId,proto3" json:"verifier_user_id,omitempty"`
+ // Credential-sensitive write value. Implementations must not log this field
+ // unless an explicit redacted value-logging path is enabled.
+ Value *MxValue `protobuf:"bytes,5,opt,name=value,proto3" json:"value,omitempty"`
+ TimestampValue *MxValue `protobuf:"bytes,6,opt,name=timestamp_value,json=timestampValue,proto3" json:"timestamp_value,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *WriteSecured2Command) Reset() {
+ *x = WriteSecured2Command{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[22]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *WriteSecured2Command) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WriteSecured2Command) ProtoMessage() {}
+
+func (x *WriteSecured2Command) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[22]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use WriteSecured2Command.ProtoReflect.Descriptor instead.
+func (*WriteSecured2Command) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{22}
+}
+
+func (x *WriteSecured2Command) GetServerHandle() int32 {
+ if x != nil {
+ return x.ServerHandle
+ }
+ return 0
+}
+
+func (x *WriteSecured2Command) GetItemHandle() int32 {
+ if x != nil {
+ return x.ItemHandle
+ }
+ return 0
+}
+
+func (x *WriteSecured2Command) GetCurrentUserId() int32 {
+ if x != nil {
+ return x.CurrentUserId
+ }
+ return 0
+}
+
+func (x *WriteSecured2Command) GetVerifierUserId() int32 {
+ if x != nil {
+ return x.VerifierUserId
+ }
+ return 0
+}
+
+func (x *WriteSecured2Command) GetValue() *MxValue {
+ if x != nil {
+ return x.Value
+ }
+ return nil
+}
+
+func (x *WriteSecured2Command) GetTimestampValue() *MxValue {
+ if x != nil {
+ return x.TimestampValue
+ }
+ return nil
+}
+
+type AuthenticateUserCommand struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ServerHandle int32 `protobuf:"varint,1,opt,name=server_handle,json=serverHandle,proto3" json:"server_handle,omitempty"`
+ VerifyUser string `protobuf:"bytes,2,opt,name=verify_user,json=verifyUser,proto3" json:"verify_user,omitempty"`
+ // Raw MXAccess credential. Implementations must keep this field out of logs,
+ // metrics labels, command lines, and diagnostics.
+ VerifyUserPassword string `protobuf:"bytes,3,opt,name=verify_user_password,json=verifyUserPassword,proto3" json:"verify_user_password,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *AuthenticateUserCommand) Reset() {
+ *x = AuthenticateUserCommand{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[23]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *AuthenticateUserCommand) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AuthenticateUserCommand) ProtoMessage() {}
+
+func (x *AuthenticateUserCommand) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[23]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use AuthenticateUserCommand.ProtoReflect.Descriptor instead.
+func (*AuthenticateUserCommand) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{23}
+}
+
+func (x *AuthenticateUserCommand) GetServerHandle() int32 {
+ if x != nil {
+ return x.ServerHandle
+ }
+ return 0
+}
+
+func (x *AuthenticateUserCommand) GetVerifyUser() string {
+ if x != nil {
+ return x.VerifyUser
+ }
+ return ""
+}
+
+func (x *AuthenticateUserCommand) GetVerifyUserPassword() string {
+ if x != nil {
+ return x.VerifyUserPassword
+ }
+ return ""
+}
+
+type ArchestrAUserToIdCommand struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ServerHandle int32 `protobuf:"varint,1,opt,name=server_handle,json=serverHandle,proto3" json:"server_handle,omitempty"`
+ UserIdGuid string `protobuf:"bytes,2,opt,name=user_id_guid,json=userIdGuid,proto3" json:"user_id_guid,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ArchestrAUserToIdCommand) Reset() {
+ *x = ArchestrAUserToIdCommand{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[24]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ArchestrAUserToIdCommand) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ArchestrAUserToIdCommand) ProtoMessage() {}
+
+func (x *ArchestrAUserToIdCommand) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[24]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ArchestrAUserToIdCommand.ProtoReflect.Descriptor instead.
+func (*ArchestrAUserToIdCommand) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{24}
+}
+
+func (x *ArchestrAUserToIdCommand) GetServerHandle() int32 {
+ if x != nil {
+ return x.ServerHandle
+ }
+ return 0
+}
+
+func (x *ArchestrAUserToIdCommand) GetUserIdGuid() string {
+ if x != nil {
+ return x.UserIdGuid
+ }
+ return ""
+}
+
+type PingCommand struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *PingCommand) Reset() {
+ *x = PingCommand{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[25]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *PingCommand) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PingCommand) ProtoMessage() {}
+
+func (x *PingCommand) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[25]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PingCommand.ProtoReflect.Descriptor instead.
+func (*PingCommand) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{25}
+}
+
+func (x *PingCommand) GetMessage() string {
+ if x != nil {
+ return x.Message
+ }
+ return ""
+}
+
+type GetSessionStateCommand struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetSessionStateCommand) Reset() {
+ *x = GetSessionStateCommand{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[26]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetSessionStateCommand) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetSessionStateCommand) ProtoMessage() {}
+
+func (x *GetSessionStateCommand) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[26]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetSessionStateCommand.ProtoReflect.Descriptor instead.
+func (*GetSessionStateCommand) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{26}
+}
+
+type GetWorkerInfoCommand struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetWorkerInfoCommand) Reset() {
+ *x = GetWorkerInfoCommand{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[27]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetWorkerInfoCommand) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetWorkerInfoCommand) ProtoMessage() {}
+
+func (x *GetWorkerInfoCommand) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[27]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetWorkerInfoCommand.ProtoReflect.Descriptor instead.
+func (*GetWorkerInfoCommand) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{27}
+}
+
+type DrainEventsCommand struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ MaxEvents uint32 `protobuf:"varint,1,opt,name=max_events,json=maxEvents,proto3" json:"max_events,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *DrainEventsCommand) Reset() {
+ *x = DrainEventsCommand{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[28]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *DrainEventsCommand) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DrainEventsCommand) ProtoMessage() {}
+
+func (x *DrainEventsCommand) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[28]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DrainEventsCommand.ProtoReflect.Descriptor instead.
+func (*DrainEventsCommand) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{28}
+}
+
+func (x *DrainEventsCommand) GetMaxEvents() uint32 {
+ if x != nil {
+ return x.MaxEvents
+ }
+ return 0
+}
+
+type ShutdownWorkerCommand struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ GracePeriod *durationpb.Duration `protobuf:"bytes,1,opt,name=grace_period,json=gracePeriod,proto3" json:"grace_period,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ShutdownWorkerCommand) Reset() {
+ *x = ShutdownWorkerCommand{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[29]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ShutdownWorkerCommand) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ShutdownWorkerCommand) ProtoMessage() {}
+
+func (x *ShutdownWorkerCommand) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[29]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ShutdownWorkerCommand.ProtoReflect.Descriptor instead.
+func (*ShutdownWorkerCommand) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{29}
+}
+
+func (x *ShutdownWorkerCommand) GetGracePeriod() *durationpb.Duration {
+ if x != nil {
+ return x.GracePeriod
+ }
+ return nil
+}
+
+type MxCommandReply struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
+ CorrelationId string `protobuf:"bytes,2,opt,name=correlation_id,json=correlationId,proto3" json:"correlation_id,omitempty"`
+ Kind MxCommandKind `protobuf:"varint,3,opt,name=kind,proto3,enum=mxaccess_gateway.v1.MxCommandKind" json:"kind,omitempty"`
+ ProtocolStatus *ProtocolStatus `protobuf:"bytes,4,opt,name=protocol_status,json=protocolStatus,proto3" json:"protocol_status,omitempty"`
+ // HRESULT captured from MXAccess or a COM exception. This remains separate
+ // from gateway protocol status so MXAccess parity details are not hidden by
+ // transport failures.
+ Hresult *int32 `protobuf:"varint,5,opt,name=hresult,proto3,oneof" json:"hresult,omitempty"`
+ ReturnValue *MxValue `protobuf:"bytes,6,opt,name=return_value,json=returnValue,proto3" json:"return_value,omitempty"`
+ Statuses []*MxStatusProxy `protobuf:"bytes,7,rep,name=statuses,proto3" json:"statuses,omitempty"`
+ DiagnosticMessage string `protobuf:"bytes,8,opt,name=diagnostic_message,json=diagnosticMessage,proto3" json:"diagnostic_message,omitempty"`
+ // Types that are valid to be assigned to Payload:
+ //
+ // *MxCommandReply_Register
+ // *MxCommandReply_AddItem
+ // *MxCommandReply_AddItem2
+ // *MxCommandReply_AddBufferedItem
+ // *MxCommandReply_Suspend
+ // *MxCommandReply_Activate
+ // *MxCommandReply_AuthenticateUser
+ // *MxCommandReply_ArchestraUserToId
+ // *MxCommandReply_SessionState
+ // *MxCommandReply_WorkerInfo
+ // *MxCommandReply_DrainEvents
+ Payload isMxCommandReply_Payload `protobuf_oneof:"payload"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *MxCommandReply) Reset() {
+ *x = MxCommandReply{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[30]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *MxCommandReply) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MxCommandReply) ProtoMessage() {}
+
+func (x *MxCommandReply) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[30]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MxCommandReply.ProtoReflect.Descriptor instead.
+func (*MxCommandReply) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{30}
+}
+
+func (x *MxCommandReply) GetSessionId() string {
+ if x != nil {
+ return x.SessionId
+ }
+ return ""
+}
+
+func (x *MxCommandReply) GetCorrelationId() string {
+ if x != nil {
+ return x.CorrelationId
+ }
+ return ""
+}
+
+func (x *MxCommandReply) GetKind() MxCommandKind {
+ if x != nil {
+ return x.Kind
+ }
+ return MxCommandKind_MX_COMMAND_KIND_UNSPECIFIED
+}
+
+func (x *MxCommandReply) GetProtocolStatus() *ProtocolStatus {
+ if x != nil {
+ return x.ProtocolStatus
+ }
+ return nil
+}
+
+func (x *MxCommandReply) GetHresult() int32 {
+ if x != nil && x.Hresult != nil {
+ return *x.Hresult
+ }
+ return 0
+}
+
+func (x *MxCommandReply) GetReturnValue() *MxValue {
+ if x != nil {
+ return x.ReturnValue
+ }
+ return nil
+}
+
+func (x *MxCommandReply) GetStatuses() []*MxStatusProxy {
+ if x != nil {
+ return x.Statuses
+ }
+ return nil
+}
+
+func (x *MxCommandReply) GetDiagnosticMessage() string {
+ if x != nil {
+ return x.DiagnosticMessage
+ }
+ return ""
+}
+
+func (x *MxCommandReply) GetPayload() isMxCommandReply_Payload {
+ if x != nil {
+ return x.Payload
+ }
+ return nil
+}
+
+func (x *MxCommandReply) GetRegister() *RegisterReply {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommandReply_Register); ok {
+ return x.Register
+ }
+ }
+ return nil
+}
+
+func (x *MxCommandReply) GetAddItem() *AddItemReply {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommandReply_AddItem); ok {
+ return x.AddItem
+ }
+ }
+ return nil
+}
+
+func (x *MxCommandReply) GetAddItem2() *AddItem2Reply {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommandReply_AddItem2); ok {
+ return x.AddItem2
+ }
+ }
+ return nil
+}
+
+func (x *MxCommandReply) GetAddBufferedItem() *AddBufferedItemReply {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommandReply_AddBufferedItem); ok {
+ return x.AddBufferedItem
+ }
+ }
+ return nil
+}
+
+func (x *MxCommandReply) GetSuspend() *SuspendReply {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommandReply_Suspend); ok {
+ return x.Suspend
+ }
+ }
+ return nil
+}
+
+func (x *MxCommandReply) GetActivate() *ActivateReply {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommandReply_Activate); ok {
+ return x.Activate
+ }
+ }
+ return nil
+}
+
+func (x *MxCommandReply) GetAuthenticateUser() *AuthenticateUserReply {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommandReply_AuthenticateUser); ok {
+ return x.AuthenticateUser
+ }
+ }
+ return nil
+}
+
+func (x *MxCommandReply) GetArchestraUserToId() *ArchestrAUserToIdReply {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommandReply_ArchestraUserToId); ok {
+ return x.ArchestraUserToId
+ }
+ }
+ return nil
+}
+
+func (x *MxCommandReply) GetSessionState() *SessionStateReply {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommandReply_SessionState); ok {
+ return x.SessionState
+ }
+ }
+ return nil
+}
+
+func (x *MxCommandReply) GetWorkerInfo() *WorkerInfoReply {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommandReply_WorkerInfo); ok {
+ return x.WorkerInfo
+ }
+ }
+ return nil
+}
+
+func (x *MxCommandReply) GetDrainEvents() *DrainEventsReply {
+ if x != nil {
+ if x, ok := x.Payload.(*MxCommandReply_DrainEvents); ok {
+ return x.DrainEvents
+ }
+ }
+ return nil
+}
+
+type isMxCommandReply_Payload interface {
+ isMxCommandReply_Payload()
+}
+
+type MxCommandReply_Register struct {
+ Register *RegisterReply `protobuf:"bytes,20,opt,name=register,proto3,oneof"`
+}
+
+type MxCommandReply_AddItem struct {
+ AddItem *AddItemReply `protobuf:"bytes,21,opt,name=add_item,json=addItem,proto3,oneof"`
+}
+
+type MxCommandReply_AddItem2 struct {
+ AddItem2 *AddItem2Reply `protobuf:"bytes,22,opt,name=add_item2,json=addItem2,proto3,oneof"`
+}
+
+type MxCommandReply_AddBufferedItem struct {
+ AddBufferedItem *AddBufferedItemReply `protobuf:"bytes,23,opt,name=add_buffered_item,json=addBufferedItem,proto3,oneof"`
+}
+
+type MxCommandReply_Suspend struct {
+ Suspend *SuspendReply `protobuf:"bytes,24,opt,name=suspend,proto3,oneof"`
+}
+
+type MxCommandReply_Activate struct {
+ Activate *ActivateReply `protobuf:"bytes,25,opt,name=activate,proto3,oneof"`
+}
+
+type MxCommandReply_AuthenticateUser struct {
+ AuthenticateUser *AuthenticateUserReply `protobuf:"bytes,26,opt,name=authenticate_user,json=authenticateUser,proto3,oneof"`
+}
+
+type MxCommandReply_ArchestraUserToId struct {
+ ArchestraUserToId *ArchestrAUserToIdReply `protobuf:"bytes,27,opt,name=archestra_user_to_id,json=archestraUserToId,proto3,oneof"`
+}
+
+type MxCommandReply_SessionState struct {
+ SessionState *SessionStateReply `protobuf:"bytes,100,opt,name=session_state,json=sessionState,proto3,oneof"`
+}
+
+type MxCommandReply_WorkerInfo struct {
+ WorkerInfo *WorkerInfoReply `protobuf:"bytes,101,opt,name=worker_info,json=workerInfo,proto3,oneof"`
+}
+
+type MxCommandReply_DrainEvents struct {
+ DrainEvents *DrainEventsReply `protobuf:"bytes,102,opt,name=drain_events,json=drainEvents,proto3,oneof"`
+}
+
+func (*MxCommandReply_Register) isMxCommandReply_Payload() {}
+
+func (*MxCommandReply_AddItem) isMxCommandReply_Payload() {}
+
+func (*MxCommandReply_AddItem2) isMxCommandReply_Payload() {}
+
+func (*MxCommandReply_AddBufferedItem) isMxCommandReply_Payload() {}
+
+func (*MxCommandReply_Suspend) isMxCommandReply_Payload() {}
+
+func (*MxCommandReply_Activate) isMxCommandReply_Payload() {}
+
+func (*MxCommandReply_AuthenticateUser) isMxCommandReply_Payload() {}
+
+func (*MxCommandReply_ArchestraUserToId) isMxCommandReply_Payload() {}
+
+func (*MxCommandReply_SessionState) isMxCommandReply_Payload() {}
+
+func (*MxCommandReply_WorkerInfo) isMxCommandReply_Payload() {}
+
+func (*MxCommandReply_DrainEvents) isMxCommandReply_Payload() {}
+
+type RegisterReply struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ServerHandle int32 `protobuf:"varint,1,opt,name=server_handle,json=serverHandle,proto3" json:"server_handle,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *RegisterReply) Reset() {
+ *x = RegisterReply{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[31]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *RegisterReply) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RegisterReply) ProtoMessage() {}
+
+func (x *RegisterReply) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[31]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RegisterReply.ProtoReflect.Descriptor instead.
+func (*RegisterReply) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{31}
+}
+
+func (x *RegisterReply) GetServerHandle() int32 {
+ if x != nil {
+ return x.ServerHandle
+ }
+ return 0
+}
+
+type AddItemReply struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ItemHandle int32 `protobuf:"varint,1,opt,name=item_handle,json=itemHandle,proto3" json:"item_handle,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *AddItemReply) Reset() {
+ *x = AddItemReply{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[32]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *AddItemReply) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AddItemReply) ProtoMessage() {}
+
+func (x *AddItemReply) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[32]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use AddItemReply.ProtoReflect.Descriptor instead.
+func (*AddItemReply) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{32}
+}
+
+func (x *AddItemReply) GetItemHandle() int32 {
+ if x != nil {
+ return x.ItemHandle
+ }
+ return 0
+}
+
+type AddItem2Reply struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ItemHandle int32 `protobuf:"varint,1,opt,name=item_handle,json=itemHandle,proto3" json:"item_handle,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *AddItem2Reply) Reset() {
+ *x = AddItem2Reply{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[33]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *AddItem2Reply) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AddItem2Reply) ProtoMessage() {}
+
+func (x *AddItem2Reply) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[33]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use AddItem2Reply.ProtoReflect.Descriptor instead.
+func (*AddItem2Reply) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{33}
+}
+
+func (x *AddItem2Reply) GetItemHandle() int32 {
+ if x != nil {
+ return x.ItemHandle
+ }
+ return 0
+}
+
+type AddBufferedItemReply struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ItemHandle int32 `protobuf:"varint,1,opt,name=item_handle,json=itemHandle,proto3" json:"item_handle,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *AddBufferedItemReply) Reset() {
+ *x = AddBufferedItemReply{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[34]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *AddBufferedItemReply) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AddBufferedItemReply) ProtoMessage() {}
+
+func (x *AddBufferedItemReply) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[34]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use AddBufferedItemReply.ProtoReflect.Descriptor instead.
+func (*AddBufferedItemReply) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{34}
+}
+
+func (x *AddBufferedItemReply) GetItemHandle() int32 {
+ if x != nil {
+ return x.ItemHandle
+ }
+ return 0
+}
+
+type SuspendReply struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Status *MxStatusProxy `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *SuspendReply) Reset() {
+ *x = SuspendReply{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[35]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *SuspendReply) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SuspendReply) ProtoMessage() {}
+
+func (x *SuspendReply) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[35]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SuspendReply.ProtoReflect.Descriptor instead.
+func (*SuspendReply) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{35}
+}
+
+func (x *SuspendReply) GetStatus() *MxStatusProxy {
+ if x != nil {
+ return x.Status
+ }
+ return nil
+}
+
+type ActivateReply struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Status *MxStatusProxy `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ActivateReply) Reset() {
+ *x = ActivateReply{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[36]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ActivateReply) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ActivateReply) ProtoMessage() {}
+
+func (x *ActivateReply) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[36]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ActivateReply.ProtoReflect.Descriptor instead.
+func (*ActivateReply) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{36}
+}
+
+func (x *ActivateReply) GetStatus() *MxStatusProxy {
+ if x != nil {
+ return x.Status
+ }
+ return nil
+}
+
+type AuthenticateUserReply struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ UserId int32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *AuthenticateUserReply) Reset() {
+ *x = AuthenticateUserReply{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[37]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *AuthenticateUserReply) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AuthenticateUserReply) ProtoMessage() {}
+
+func (x *AuthenticateUserReply) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[37]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use AuthenticateUserReply.ProtoReflect.Descriptor instead.
+func (*AuthenticateUserReply) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{37}
+}
+
+func (x *AuthenticateUserReply) GetUserId() int32 {
+ if x != nil {
+ return x.UserId
+ }
+ return 0
+}
+
+type ArchestrAUserToIdReply struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ UserId int32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ArchestrAUserToIdReply) Reset() {
+ *x = ArchestrAUserToIdReply{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[38]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ArchestrAUserToIdReply) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ArchestrAUserToIdReply) ProtoMessage() {}
+
+func (x *ArchestrAUserToIdReply) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[38]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ArchestrAUserToIdReply.ProtoReflect.Descriptor instead.
+func (*ArchestrAUserToIdReply) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{38}
+}
+
+func (x *ArchestrAUserToIdReply) GetUserId() int32 {
+ if x != nil {
+ return x.UserId
+ }
+ return 0
+}
+
+type SessionStateReply struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ State SessionState `protobuf:"varint,1,opt,name=state,proto3,enum=mxaccess_gateway.v1.SessionState" json:"state,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *SessionStateReply) Reset() {
+ *x = SessionStateReply{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[39]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *SessionStateReply) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SessionStateReply) ProtoMessage() {}
+
+func (x *SessionStateReply) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[39]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SessionStateReply.ProtoReflect.Descriptor instead.
+func (*SessionStateReply) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{39}
+}
+
+func (x *SessionStateReply) GetState() SessionState {
+ if x != nil {
+ return x.State
+ }
+ return SessionState_SESSION_STATE_UNSPECIFIED
+}
+
+type WorkerInfoReply struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ WorkerProcessId int32 `protobuf:"varint,1,opt,name=worker_process_id,json=workerProcessId,proto3" json:"worker_process_id,omitempty"`
+ WorkerVersion string `protobuf:"bytes,2,opt,name=worker_version,json=workerVersion,proto3" json:"worker_version,omitempty"`
+ MxaccessProgid string `protobuf:"bytes,3,opt,name=mxaccess_progid,json=mxaccessProgid,proto3" json:"mxaccess_progid,omitempty"`
+ MxaccessClsid string `protobuf:"bytes,4,opt,name=mxaccess_clsid,json=mxaccessClsid,proto3" json:"mxaccess_clsid,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *WorkerInfoReply) Reset() {
+ *x = WorkerInfoReply{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[40]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *WorkerInfoReply) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WorkerInfoReply) ProtoMessage() {}
+
+func (x *WorkerInfoReply) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[40]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use WorkerInfoReply.ProtoReflect.Descriptor instead.
+func (*WorkerInfoReply) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{40}
+}
+
+func (x *WorkerInfoReply) GetWorkerProcessId() int32 {
+ if x != nil {
+ return x.WorkerProcessId
+ }
+ return 0
+}
+
+func (x *WorkerInfoReply) GetWorkerVersion() string {
+ if x != nil {
+ return x.WorkerVersion
+ }
+ return ""
+}
+
+func (x *WorkerInfoReply) GetMxaccessProgid() string {
+ if x != nil {
+ return x.MxaccessProgid
+ }
+ return ""
+}
+
+func (x *WorkerInfoReply) GetMxaccessClsid() string {
+ if x != nil {
+ return x.MxaccessClsid
+ }
+ return ""
+}
+
+type DrainEventsReply struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Events []*MxEvent `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *DrainEventsReply) Reset() {
+ *x = DrainEventsReply{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[41]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *DrainEventsReply) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DrainEventsReply) ProtoMessage() {}
+
+func (x *DrainEventsReply) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[41]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DrainEventsReply.ProtoReflect.Descriptor instead.
+func (*DrainEventsReply) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{41}
+}
+
+func (x *DrainEventsReply) GetEvents() []*MxEvent {
+ if x != nil {
+ return x.Events
+ }
+ return nil
+}
+
+type MxEvent struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Family MxEventFamily `protobuf:"varint,1,opt,name=family,proto3,enum=mxaccess_gateway.v1.MxEventFamily" json:"family,omitempty"`
+ SessionId string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
+ ServerHandle int32 `protobuf:"varint,3,opt,name=server_handle,json=serverHandle,proto3" json:"server_handle,omitempty"`
+ ItemHandle int32 `protobuf:"varint,4,opt,name=item_handle,json=itemHandle,proto3" json:"item_handle,omitempty"`
+ Value *MxValue `protobuf:"bytes,5,opt,name=value,proto3" json:"value,omitempty"`
+ Quality int32 `protobuf:"varint,6,opt,name=quality,proto3" json:"quality,omitempty"`
+ SourceTimestamp *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=source_timestamp,json=sourceTimestamp,proto3" json:"source_timestamp,omitempty"`
+ Statuses []*MxStatusProxy `protobuf:"bytes,8,rep,name=statuses,proto3" json:"statuses,omitempty"`
+ WorkerSequence uint64 `protobuf:"varint,9,opt,name=worker_sequence,json=workerSequence,proto3" json:"worker_sequence,omitempty"`
+ WorkerTimestamp *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=worker_timestamp,json=workerTimestamp,proto3" json:"worker_timestamp,omitempty"`
+ GatewayReceiveTimestamp *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=gateway_receive_timestamp,json=gatewayReceiveTimestamp,proto3" json:"gateway_receive_timestamp,omitempty"`
+ Hresult *int32 `protobuf:"varint,12,opt,name=hresult,proto3,oneof" json:"hresult,omitempty"`
+ RawStatus string `protobuf:"bytes,13,opt,name=raw_status,json=rawStatus,proto3" json:"raw_status,omitempty"`
+ // Types that are valid to be assigned to Body:
+ //
+ // *MxEvent_OnDataChange
+ // *MxEvent_OnWriteComplete
+ // *MxEvent_OperationComplete
+ // *MxEvent_OnBufferedDataChange
+ Body isMxEvent_Body `protobuf_oneof:"body"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *MxEvent) Reset() {
+ *x = MxEvent{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[42]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *MxEvent) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MxEvent) ProtoMessage() {}
+
+func (x *MxEvent) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[42]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MxEvent.ProtoReflect.Descriptor instead.
+func (*MxEvent) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{42}
+}
+
+func (x *MxEvent) GetFamily() MxEventFamily {
+ if x != nil {
+ return x.Family
+ }
+ return MxEventFamily_MX_EVENT_FAMILY_UNSPECIFIED
+}
+
+func (x *MxEvent) GetSessionId() string {
+ if x != nil {
+ return x.SessionId
+ }
+ return ""
+}
+
+func (x *MxEvent) GetServerHandle() int32 {
+ if x != nil {
+ return x.ServerHandle
+ }
+ return 0
+}
+
+func (x *MxEvent) GetItemHandle() int32 {
+ if x != nil {
+ return x.ItemHandle
+ }
+ return 0
+}
+
+func (x *MxEvent) GetValue() *MxValue {
+ if x != nil {
+ return x.Value
+ }
+ return nil
+}
+
+func (x *MxEvent) GetQuality() int32 {
+ if x != nil {
+ return x.Quality
+ }
+ return 0
+}
+
+func (x *MxEvent) GetSourceTimestamp() *timestamppb.Timestamp {
+ if x != nil {
+ return x.SourceTimestamp
+ }
+ return nil
+}
+
+func (x *MxEvent) GetStatuses() []*MxStatusProxy {
+ if x != nil {
+ return x.Statuses
+ }
+ return nil
+}
+
+func (x *MxEvent) GetWorkerSequence() uint64 {
+ if x != nil {
+ return x.WorkerSequence
+ }
+ return 0
+}
+
+func (x *MxEvent) GetWorkerTimestamp() *timestamppb.Timestamp {
+ if x != nil {
+ return x.WorkerTimestamp
+ }
+ return nil
+}
+
+func (x *MxEvent) GetGatewayReceiveTimestamp() *timestamppb.Timestamp {
+ if x != nil {
+ return x.GatewayReceiveTimestamp
+ }
+ return nil
+}
+
+func (x *MxEvent) GetHresult() int32 {
+ if x != nil && x.Hresult != nil {
+ return *x.Hresult
+ }
+ return 0
+}
+
+func (x *MxEvent) GetRawStatus() string {
+ if x != nil {
+ return x.RawStatus
+ }
+ return ""
+}
+
+func (x *MxEvent) GetBody() isMxEvent_Body {
+ if x != nil {
+ return x.Body
+ }
+ return nil
+}
+
+func (x *MxEvent) GetOnDataChange() *OnDataChangeEvent {
+ if x != nil {
+ if x, ok := x.Body.(*MxEvent_OnDataChange); ok {
+ return x.OnDataChange
+ }
+ }
+ return nil
+}
+
+func (x *MxEvent) GetOnWriteComplete() *OnWriteCompleteEvent {
+ if x != nil {
+ if x, ok := x.Body.(*MxEvent_OnWriteComplete); ok {
+ return x.OnWriteComplete
+ }
+ }
+ return nil
+}
+
+func (x *MxEvent) GetOperationComplete() *OperationCompleteEvent {
+ if x != nil {
+ if x, ok := x.Body.(*MxEvent_OperationComplete); ok {
+ return x.OperationComplete
+ }
+ }
+ return nil
+}
+
+func (x *MxEvent) GetOnBufferedDataChange() *OnBufferedDataChangeEvent {
+ if x != nil {
+ if x, ok := x.Body.(*MxEvent_OnBufferedDataChange); ok {
+ return x.OnBufferedDataChange
+ }
+ }
+ return nil
+}
+
+type isMxEvent_Body interface {
+ isMxEvent_Body()
+}
+
+type MxEvent_OnDataChange struct {
+ OnDataChange *OnDataChangeEvent `protobuf:"bytes,20,opt,name=on_data_change,json=onDataChange,proto3,oneof"`
+}
+
+type MxEvent_OnWriteComplete struct {
+ OnWriteComplete *OnWriteCompleteEvent `protobuf:"bytes,21,opt,name=on_write_complete,json=onWriteComplete,proto3,oneof"`
+}
+
+type MxEvent_OperationComplete struct {
+ OperationComplete *OperationCompleteEvent `protobuf:"bytes,22,opt,name=operation_complete,json=operationComplete,proto3,oneof"`
+}
+
+type MxEvent_OnBufferedDataChange struct {
+ OnBufferedDataChange *OnBufferedDataChangeEvent `protobuf:"bytes,23,opt,name=on_buffered_data_change,json=onBufferedDataChange,proto3,oneof"`
+}
+
+func (*MxEvent_OnDataChange) isMxEvent_Body() {}
+
+func (*MxEvent_OnWriteComplete) isMxEvent_Body() {}
+
+func (*MxEvent_OperationComplete) isMxEvent_Body() {}
+
+func (*MxEvent_OnBufferedDataChange) isMxEvent_Body() {}
+
+type OnDataChangeEvent struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *OnDataChangeEvent) Reset() {
+ *x = OnDataChangeEvent{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[43]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *OnDataChangeEvent) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*OnDataChangeEvent) ProtoMessage() {}
+
+func (x *OnDataChangeEvent) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[43]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use OnDataChangeEvent.ProtoReflect.Descriptor instead.
+func (*OnDataChangeEvent) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{43}
+}
+
+type OnWriteCompleteEvent struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *OnWriteCompleteEvent) Reset() {
+ *x = OnWriteCompleteEvent{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[44]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *OnWriteCompleteEvent) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*OnWriteCompleteEvent) ProtoMessage() {}
+
+func (x *OnWriteCompleteEvent) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[44]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use OnWriteCompleteEvent.ProtoReflect.Descriptor instead.
+func (*OnWriteCompleteEvent) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{44}
+}
+
+type OperationCompleteEvent struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *OperationCompleteEvent) Reset() {
+ *x = OperationCompleteEvent{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[45]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *OperationCompleteEvent) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*OperationCompleteEvent) ProtoMessage() {}
+
+func (x *OperationCompleteEvent) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[45]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use OperationCompleteEvent.ProtoReflect.Descriptor instead.
+func (*OperationCompleteEvent) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{45}
+}
+
+type OnBufferedDataChangeEvent struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ DataType MxDataType `protobuf:"varint,1,opt,name=data_type,json=dataType,proto3,enum=mxaccess_gateway.v1.MxDataType" json:"data_type,omitempty"`
+ QualityValues *MxArray `protobuf:"bytes,2,opt,name=quality_values,json=qualityValues,proto3" json:"quality_values,omitempty"`
+ TimestampValues *MxArray `protobuf:"bytes,3,opt,name=timestamp_values,json=timestampValues,proto3" json:"timestamp_values,omitempty"`
+ RawDataType int32 `protobuf:"varint,4,opt,name=raw_data_type,json=rawDataType,proto3" json:"raw_data_type,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *OnBufferedDataChangeEvent) Reset() {
+ *x = OnBufferedDataChangeEvent{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[46]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *OnBufferedDataChangeEvent) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*OnBufferedDataChangeEvent) ProtoMessage() {}
+
+func (x *OnBufferedDataChangeEvent) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[46]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use OnBufferedDataChangeEvent.ProtoReflect.Descriptor instead.
+func (*OnBufferedDataChangeEvent) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{46}
+}
+
+func (x *OnBufferedDataChangeEvent) GetDataType() MxDataType {
+ if x != nil {
+ return x.DataType
+ }
+ return MxDataType_MX_DATA_TYPE_UNSPECIFIED
+}
+
+func (x *OnBufferedDataChangeEvent) GetQualityValues() *MxArray {
+ if x != nil {
+ return x.QualityValues
+ }
+ return nil
+}
+
+func (x *OnBufferedDataChangeEvent) GetTimestampValues() *MxArray {
+ if x != nil {
+ return x.TimestampValues
+ }
+ return nil
+}
+
+func (x *OnBufferedDataChangeEvent) GetRawDataType() int32 {
+ if x != nil {
+ return x.RawDataType
+ }
+ return 0
+}
+
+type MxStatusProxy struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Success int32 `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
+ Category MxStatusCategory `protobuf:"varint,2,opt,name=category,proto3,enum=mxaccess_gateway.v1.MxStatusCategory" json:"category,omitempty"`
+ DetectedBy MxStatusSource `protobuf:"varint,3,opt,name=detected_by,json=detectedBy,proto3,enum=mxaccess_gateway.v1.MxStatusSource" json:"detected_by,omitempty"`
+ Detail int32 `protobuf:"varint,4,opt,name=detail,proto3" json:"detail,omitempty"`
+ RawCategory int32 `protobuf:"varint,5,opt,name=raw_category,json=rawCategory,proto3" json:"raw_category,omitempty"`
+ RawDetectedBy int32 `protobuf:"varint,6,opt,name=raw_detected_by,json=rawDetectedBy,proto3" json:"raw_detected_by,omitempty"`
+ DiagnosticText string `protobuf:"bytes,7,opt,name=diagnostic_text,json=diagnosticText,proto3" json:"diagnostic_text,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *MxStatusProxy) Reset() {
+ *x = MxStatusProxy{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[47]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *MxStatusProxy) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MxStatusProxy) ProtoMessage() {}
+
+func (x *MxStatusProxy) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[47]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MxStatusProxy.ProtoReflect.Descriptor instead.
+func (*MxStatusProxy) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{47}
+}
+
+func (x *MxStatusProxy) GetSuccess() int32 {
+ if x != nil {
+ return x.Success
+ }
+ return 0
+}
+
+func (x *MxStatusProxy) GetCategory() MxStatusCategory {
+ if x != nil {
+ return x.Category
+ }
+ return MxStatusCategory_MX_STATUS_CATEGORY_UNSPECIFIED
+}
+
+func (x *MxStatusProxy) GetDetectedBy() MxStatusSource {
+ if x != nil {
+ return x.DetectedBy
+ }
+ return MxStatusSource_MX_STATUS_SOURCE_UNSPECIFIED
+}
+
+func (x *MxStatusProxy) GetDetail() int32 {
+ if x != nil {
+ return x.Detail
+ }
+ return 0
+}
+
+func (x *MxStatusProxy) GetRawCategory() int32 {
+ if x != nil {
+ return x.RawCategory
+ }
+ return 0
+}
+
+func (x *MxStatusProxy) GetRawDetectedBy() int32 {
+ if x != nil {
+ return x.RawDetectedBy
+ }
+ return 0
+}
+
+func (x *MxStatusProxy) GetDiagnosticText() string {
+ if x != nil {
+ return x.DiagnosticText
+ }
+ return ""
+}
+
+type MxValue struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ DataType MxDataType `protobuf:"varint,1,opt,name=data_type,json=dataType,proto3,enum=mxaccess_gateway.v1.MxDataType" json:"data_type,omitempty"`
+ VariantType string `protobuf:"bytes,2,opt,name=variant_type,json=variantType,proto3" json:"variant_type,omitempty"`
+ IsNull bool `protobuf:"varint,3,opt,name=is_null,json=isNull,proto3" json:"is_null,omitempty"`
+ RawDiagnostic string `protobuf:"bytes,4,opt,name=raw_diagnostic,json=rawDiagnostic,proto3" json:"raw_diagnostic,omitempty"`
+ RawDataType int32 `protobuf:"varint,5,opt,name=raw_data_type,json=rawDataType,proto3" json:"raw_data_type,omitempty"`
+ // Types that are valid to be assigned to Kind:
+ //
+ // *MxValue_BoolValue
+ // *MxValue_Int32Value
+ // *MxValue_Int64Value
+ // *MxValue_FloatValue
+ // *MxValue_DoubleValue
+ // *MxValue_StringValue
+ // *MxValue_TimestampValue
+ // *MxValue_ArrayValue
+ // *MxValue_RawValue
+ Kind isMxValue_Kind `protobuf_oneof:"kind"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *MxValue) Reset() {
+ *x = MxValue{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[48]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *MxValue) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MxValue) ProtoMessage() {}
+
+func (x *MxValue) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[48]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MxValue.ProtoReflect.Descriptor instead.
+func (*MxValue) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{48}
+}
+
+func (x *MxValue) GetDataType() MxDataType {
+ if x != nil {
+ return x.DataType
+ }
+ return MxDataType_MX_DATA_TYPE_UNSPECIFIED
+}
+
+func (x *MxValue) GetVariantType() string {
+ if x != nil {
+ return x.VariantType
+ }
+ return ""
+}
+
+func (x *MxValue) GetIsNull() bool {
+ if x != nil {
+ return x.IsNull
+ }
+ return false
+}
+
+func (x *MxValue) GetRawDiagnostic() string {
+ if x != nil {
+ return x.RawDiagnostic
+ }
+ return ""
+}
+
+func (x *MxValue) GetRawDataType() int32 {
+ if x != nil {
+ return x.RawDataType
+ }
+ return 0
+}
+
+func (x *MxValue) GetKind() isMxValue_Kind {
+ if x != nil {
+ return x.Kind
+ }
+ return nil
+}
+
+func (x *MxValue) GetBoolValue() bool {
+ if x != nil {
+ if x, ok := x.Kind.(*MxValue_BoolValue); ok {
+ return x.BoolValue
+ }
+ }
+ return false
+}
+
+func (x *MxValue) GetInt32Value() int32 {
+ if x != nil {
+ if x, ok := x.Kind.(*MxValue_Int32Value); ok {
+ return x.Int32Value
+ }
+ }
+ return 0
+}
+
+func (x *MxValue) GetInt64Value() int64 {
+ if x != nil {
+ if x, ok := x.Kind.(*MxValue_Int64Value); ok {
+ return x.Int64Value
+ }
+ }
+ return 0
+}
+
+func (x *MxValue) GetFloatValue() float32 {
+ if x != nil {
+ if x, ok := x.Kind.(*MxValue_FloatValue); ok {
+ return x.FloatValue
+ }
+ }
+ return 0
+}
+
+func (x *MxValue) GetDoubleValue() float64 {
+ if x != nil {
+ if x, ok := x.Kind.(*MxValue_DoubleValue); ok {
+ return x.DoubleValue
+ }
+ }
+ return 0
+}
+
+func (x *MxValue) GetStringValue() string {
+ if x != nil {
+ if x, ok := x.Kind.(*MxValue_StringValue); ok {
+ return x.StringValue
+ }
+ }
+ return ""
+}
+
+func (x *MxValue) GetTimestampValue() *timestamppb.Timestamp {
+ if x != nil {
+ if x, ok := x.Kind.(*MxValue_TimestampValue); ok {
+ return x.TimestampValue
+ }
+ }
+ return nil
+}
+
+func (x *MxValue) GetArrayValue() *MxArray {
+ if x != nil {
+ if x, ok := x.Kind.(*MxValue_ArrayValue); ok {
+ return x.ArrayValue
+ }
+ }
+ return nil
+}
+
+func (x *MxValue) GetRawValue() []byte {
+ if x != nil {
+ if x, ok := x.Kind.(*MxValue_RawValue); ok {
+ return x.RawValue
+ }
+ }
+ return nil
+}
+
+type isMxValue_Kind interface {
+ isMxValue_Kind()
+}
+
+type MxValue_BoolValue struct {
+ BoolValue bool `protobuf:"varint,10,opt,name=bool_value,json=boolValue,proto3,oneof"`
+}
+
+type MxValue_Int32Value struct {
+ Int32Value int32 `protobuf:"varint,11,opt,name=int32_value,json=int32Value,proto3,oneof"`
+}
+
+type MxValue_Int64Value struct {
+ Int64Value int64 `protobuf:"varint,12,opt,name=int64_value,json=int64Value,proto3,oneof"`
+}
+
+type MxValue_FloatValue struct {
+ FloatValue float32 `protobuf:"fixed32,13,opt,name=float_value,json=floatValue,proto3,oneof"`
+}
+
+type MxValue_DoubleValue struct {
+ DoubleValue float64 `protobuf:"fixed64,14,opt,name=double_value,json=doubleValue,proto3,oneof"`
+}
+
+type MxValue_StringValue struct {
+ StringValue string `protobuf:"bytes,15,opt,name=string_value,json=stringValue,proto3,oneof"`
+}
+
+type MxValue_TimestampValue struct {
+ TimestampValue *timestamppb.Timestamp `protobuf:"bytes,16,opt,name=timestamp_value,json=timestampValue,proto3,oneof"`
+}
+
+type MxValue_ArrayValue struct {
+ ArrayValue *MxArray `protobuf:"bytes,17,opt,name=array_value,json=arrayValue,proto3,oneof"`
+}
+
+type MxValue_RawValue struct {
+ RawValue []byte `protobuf:"bytes,18,opt,name=raw_value,json=rawValue,proto3,oneof"`
+}
+
+func (*MxValue_BoolValue) isMxValue_Kind() {}
+
+func (*MxValue_Int32Value) isMxValue_Kind() {}
+
+func (*MxValue_Int64Value) isMxValue_Kind() {}
+
+func (*MxValue_FloatValue) isMxValue_Kind() {}
+
+func (*MxValue_DoubleValue) isMxValue_Kind() {}
+
+func (*MxValue_StringValue) isMxValue_Kind() {}
+
+func (*MxValue_TimestampValue) isMxValue_Kind() {}
+
+func (*MxValue_ArrayValue) isMxValue_Kind() {}
+
+func (*MxValue_RawValue) isMxValue_Kind() {}
+
+type MxArray struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ElementDataType MxDataType `protobuf:"varint,1,opt,name=element_data_type,json=elementDataType,proto3,enum=mxaccess_gateway.v1.MxDataType" json:"element_data_type,omitempty"`
+ VariantType string `protobuf:"bytes,2,opt,name=variant_type,json=variantType,proto3" json:"variant_type,omitempty"`
+ Dimensions []uint32 `protobuf:"varint,3,rep,packed,name=dimensions,proto3" json:"dimensions,omitempty"`
+ RawDiagnostic string `protobuf:"bytes,4,opt,name=raw_diagnostic,json=rawDiagnostic,proto3" json:"raw_diagnostic,omitempty"`
+ RawElementDataType int32 `protobuf:"varint,5,opt,name=raw_element_data_type,json=rawElementDataType,proto3" json:"raw_element_data_type,omitempty"`
+ // Types that are valid to be assigned to Values:
+ //
+ // *MxArray_BoolValues
+ // *MxArray_Int32Values
+ // *MxArray_Int64Values
+ // *MxArray_FloatValues
+ // *MxArray_DoubleValues
+ // *MxArray_StringValues
+ // *MxArray_TimestampValues
+ // *MxArray_RawValues
+ Values isMxArray_Values `protobuf_oneof:"values"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *MxArray) Reset() {
+ *x = MxArray{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[49]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *MxArray) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MxArray) ProtoMessage() {}
+
+func (x *MxArray) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[49]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MxArray.ProtoReflect.Descriptor instead.
+func (*MxArray) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{49}
+}
+
+func (x *MxArray) GetElementDataType() MxDataType {
+ if x != nil {
+ return x.ElementDataType
+ }
+ return MxDataType_MX_DATA_TYPE_UNSPECIFIED
+}
+
+func (x *MxArray) GetVariantType() string {
+ if x != nil {
+ return x.VariantType
+ }
+ return ""
+}
+
+func (x *MxArray) GetDimensions() []uint32 {
+ if x != nil {
+ return x.Dimensions
+ }
+ return nil
+}
+
+func (x *MxArray) GetRawDiagnostic() string {
+ if x != nil {
+ return x.RawDiagnostic
+ }
+ return ""
+}
+
+func (x *MxArray) GetRawElementDataType() int32 {
+ if x != nil {
+ return x.RawElementDataType
+ }
+ return 0
+}
+
+func (x *MxArray) GetValues() isMxArray_Values {
+ if x != nil {
+ return x.Values
+ }
+ return nil
+}
+
+func (x *MxArray) GetBoolValues() *BoolArray {
+ if x != nil {
+ if x, ok := x.Values.(*MxArray_BoolValues); ok {
+ return x.BoolValues
+ }
+ }
+ return nil
+}
+
+func (x *MxArray) GetInt32Values() *Int32Array {
+ if x != nil {
+ if x, ok := x.Values.(*MxArray_Int32Values); ok {
+ return x.Int32Values
+ }
+ }
+ return nil
+}
+
+func (x *MxArray) GetInt64Values() *Int64Array {
+ if x != nil {
+ if x, ok := x.Values.(*MxArray_Int64Values); ok {
+ return x.Int64Values
+ }
+ }
+ return nil
+}
+
+func (x *MxArray) GetFloatValues() *FloatArray {
+ if x != nil {
+ if x, ok := x.Values.(*MxArray_FloatValues); ok {
+ return x.FloatValues
+ }
+ }
+ return nil
+}
+
+func (x *MxArray) GetDoubleValues() *DoubleArray {
+ if x != nil {
+ if x, ok := x.Values.(*MxArray_DoubleValues); ok {
+ return x.DoubleValues
+ }
+ }
+ return nil
+}
+
+func (x *MxArray) GetStringValues() *StringArray {
+ if x != nil {
+ if x, ok := x.Values.(*MxArray_StringValues); ok {
+ return x.StringValues
+ }
+ }
+ return nil
+}
+
+func (x *MxArray) GetTimestampValues() *TimestampArray {
+ if x != nil {
+ if x, ok := x.Values.(*MxArray_TimestampValues); ok {
+ return x.TimestampValues
+ }
+ }
+ return nil
+}
+
+func (x *MxArray) GetRawValues() *RawArray {
+ if x != nil {
+ if x, ok := x.Values.(*MxArray_RawValues); ok {
+ return x.RawValues
+ }
+ }
+ return nil
+}
+
+type isMxArray_Values interface {
+ isMxArray_Values()
+}
+
+type MxArray_BoolValues struct {
+ BoolValues *BoolArray `protobuf:"bytes,10,opt,name=bool_values,json=boolValues,proto3,oneof"`
+}
+
+type MxArray_Int32Values struct {
+ Int32Values *Int32Array `protobuf:"bytes,11,opt,name=int32_values,json=int32Values,proto3,oneof"`
+}
+
+type MxArray_Int64Values struct {
+ Int64Values *Int64Array `protobuf:"bytes,12,opt,name=int64_values,json=int64Values,proto3,oneof"`
+}
+
+type MxArray_FloatValues struct {
+ FloatValues *FloatArray `protobuf:"bytes,13,opt,name=float_values,json=floatValues,proto3,oneof"`
+}
+
+type MxArray_DoubleValues struct {
+ DoubleValues *DoubleArray `protobuf:"bytes,14,opt,name=double_values,json=doubleValues,proto3,oneof"`
+}
+
+type MxArray_StringValues struct {
+ StringValues *StringArray `protobuf:"bytes,15,opt,name=string_values,json=stringValues,proto3,oneof"`
+}
+
+type MxArray_TimestampValues struct {
+ TimestampValues *TimestampArray `protobuf:"bytes,16,opt,name=timestamp_values,json=timestampValues,proto3,oneof"`
+}
+
+type MxArray_RawValues struct {
+ RawValues *RawArray `protobuf:"bytes,17,opt,name=raw_values,json=rawValues,proto3,oneof"`
+}
+
+func (*MxArray_BoolValues) isMxArray_Values() {}
+
+func (*MxArray_Int32Values) isMxArray_Values() {}
+
+func (*MxArray_Int64Values) isMxArray_Values() {}
+
+func (*MxArray_FloatValues) isMxArray_Values() {}
+
+func (*MxArray_DoubleValues) isMxArray_Values() {}
+
+func (*MxArray_StringValues) isMxArray_Values() {}
+
+func (*MxArray_TimestampValues) isMxArray_Values() {}
+
+func (*MxArray_RawValues) isMxArray_Values() {}
+
+type BoolArray struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Values []bool `protobuf:"varint,1,rep,packed,name=values,proto3" json:"values,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *BoolArray) Reset() {
+ *x = BoolArray{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[50]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *BoolArray) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BoolArray) ProtoMessage() {}
+
+func (x *BoolArray) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[50]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use BoolArray.ProtoReflect.Descriptor instead.
+func (*BoolArray) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{50}
+}
+
+func (x *BoolArray) GetValues() []bool {
+ if x != nil {
+ return x.Values
+ }
+ return nil
+}
+
+type Int32Array struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Values []int32 `protobuf:"varint,1,rep,packed,name=values,proto3" json:"values,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Int32Array) Reset() {
+ *x = Int32Array{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[51]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Int32Array) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Int32Array) ProtoMessage() {}
+
+func (x *Int32Array) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[51]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Int32Array.ProtoReflect.Descriptor instead.
+func (*Int32Array) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{51}
+}
+
+func (x *Int32Array) GetValues() []int32 {
+ if x != nil {
+ return x.Values
+ }
+ return nil
+}
+
+type Int64Array struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Values []int64 `protobuf:"varint,1,rep,packed,name=values,proto3" json:"values,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Int64Array) Reset() {
+ *x = Int64Array{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[52]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Int64Array) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Int64Array) ProtoMessage() {}
+
+func (x *Int64Array) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[52]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Int64Array.ProtoReflect.Descriptor instead.
+func (*Int64Array) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{52}
+}
+
+func (x *Int64Array) GetValues() []int64 {
+ if x != nil {
+ return x.Values
+ }
+ return nil
+}
+
+type FloatArray struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Values []float32 `protobuf:"fixed32,1,rep,packed,name=values,proto3" json:"values,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *FloatArray) Reset() {
+ *x = FloatArray{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[53]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *FloatArray) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FloatArray) ProtoMessage() {}
+
+func (x *FloatArray) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[53]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FloatArray.ProtoReflect.Descriptor instead.
+func (*FloatArray) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{53}
+}
+
+func (x *FloatArray) GetValues() []float32 {
+ if x != nil {
+ return x.Values
+ }
+ return nil
+}
+
+type DoubleArray struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Values []float64 `protobuf:"fixed64,1,rep,packed,name=values,proto3" json:"values,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *DoubleArray) Reset() {
+ *x = DoubleArray{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[54]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *DoubleArray) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DoubleArray) ProtoMessage() {}
+
+func (x *DoubleArray) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[54]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DoubleArray.ProtoReflect.Descriptor instead.
+func (*DoubleArray) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{54}
+}
+
+func (x *DoubleArray) GetValues() []float64 {
+ if x != nil {
+ return x.Values
+ }
+ return nil
+}
+
+type StringArray struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Values []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *StringArray) Reset() {
+ *x = StringArray{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[55]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *StringArray) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StringArray) ProtoMessage() {}
+
+func (x *StringArray) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[55]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use StringArray.ProtoReflect.Descriptor instead.
+func (*StringArray) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{55}
+}
+
+func (x *StringArray) GetValues() []string {
+ if x != nil {
+ return x.Values
+ }
+ return nil
+}
+
+type TimestampArray struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Values []*timestamppb.Timestamp `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *TimestampArray) Reset() {
+ *x = TimestampArray{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[56]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *TimestampArray) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TimestampArray) ProtoMessage() {}
+
+func (x *TimestampArray) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[56]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TimestampArray.ProtoReflect.Descriptor instead.
+func (*TimestampArray) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{56}
+}
+
+func (x *TimestampArray) GetValues() []*timestamppb.Timestamp {
+ if x != nil {
+ return x.Values
+ }
+ return nil
+}
+
+type RawArray struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Values [][]byte `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *RawArray) Reset() {
+ *x = RawArray{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[57]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *RawArray) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RawArray) ProtoMessage() {}
+
+func (x *RawArray) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[57]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RawArray.ProtoReflect.Descriptor instead.
+func (*RawArray) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{57}
+}
+
+func (x *RawArray) GetValues() [][]byte {
+ if x != nil {
+ return x.Values
+ }
+ return nil
+}
+
+type ProtocolStatus struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Code ProtocolStatusCode `protobuf:"varint,1,opt,name=code,proto3,enum=mxaccess_gateway.v1.ProtocolStatusCode" json:"code,omitempty"`
+ Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ProtocolStatus) Reset() {
+ *x = ProtocolStatus{}
+ mi := &file_mxaccess_gateway_proto_msgTypes[58]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ProtocolStatus) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ProtocolStatus) ProtoMessage() {}
+
+func (x *ProtocolStatus) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_gateway_proto_msgTypes[58]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ProtocolStatus.ProtoReflect.Descriptor instead.
+func (*ProtocolStatus) Descriptor() ([]byte, []int) {
+ return file_mxaccess_gateway_proto_rawDescGZIP(), []int{58}
+}
+
+func (x *ProtocolStatus) GetCode() ProtocolStatusCode {
+ if x != nil {
+ return x.Code
+ }
+ return ProtocolStatusCode_PROTOCOL_STATUS_CODE_UNSPECIFIED
+}
+
+func (x *ProtocolStatus) GetMessage() string {
+ if x != nil {
+ return x.Message
+ }
+ return ""
+}
+
+var File_mxaccess_gateway_proto protoreflect.FileDescriptor
+
+const file_mxaccess_gateway_proto_rawDesc = "" +
+ "\n" +
+ "\x16mxaccess_gateway.proto\x12\x13mxaccess_gateway.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe9\x01\n" +
+ "\x12OpenSessionRequest\x12+\n" +
+ "\x11requested_backend\x18\x01 \x01(\tR\x10requestedBackend\x12.\n" +
+ "\x13client_session_name\x18\x02 \x01(\tR\x11clientSessionName\x122\n" +
+ "\x15client_correlation_id\x18\x03 \x01(\tR\x13clientCorrelationId\x12B\n" +
+ "\x0fcommand_timeout\x18\x04 \x01(\v2\x19.google.protobuf.DurationR\x0ecommandTimeout\"\xb7\x03\n" +
+ "\x10OpenSessionReply\x12\x1d\n" +
+ "\n" +
+ "session_id\x18\x01 \x01(\tR\tsessionId\x12!\n" +
+ "\fbackend_name\x18\x02 \x01(\tR\vbackendName\x12*\n" +
+ "\x11worker_process_id\x18\x03 \x01(\x05R\x0fworkerProcessId\x126\n" +
+ "\x17worker_protocol_version\x18\x04 \x01(\rR\x15workerProtocolVersion\x12\"\n" +
+ "\fcapabilities\x18\x05 \x03(\tR\fcapabilities\x12Q\n" +
+ "\x17default_command_timeout\x18\x06 \x01(\v2\x19.google.protobuf.DurationR\x15defaultCommandTimeout\x12L\n" +
+ "\x0fprotocol_status\x18\a \x01(\v2#.mxaccess_gateway.v1.ProtocolStatusR\x0eprotocolStatus\x128\n" +
+ "\x18gateway_protocol_version\x18\b \x01(\rR\x16gatewayProtocolVersion\"h\n" +
+ "\x13CloseSessionRequest\x12\x1d\n" +
+ "\n" +
+ "session_id\x18\x01 \x01(\tR\tsessionId\x122\n" +
+ "\x15client_correlation_id\x18\x02 \x01(\tR\x13clientCorrelationId\"\xc4\x01\n" +
+ "\x11CloseSessionReply\x12\x1d\n" +
+ "\n" +
+ "session_id\x18\x01 \x01(\tR\tsessionId\x12B\n" +
+ "\vfinal_state\x18\x02 \x01(\x0e2!.mxaccess_gateway.v1.SessionStateR\n" +
+ "finalState\x12L\n" +
+ "\x0fprotocol_status\x18\x03 \x01(\v2#.mxaccess_gateway.v1.ProtocolStatusR\x0eprotocolStatus\"h\n" +
+ "\x13StreamEventsRequest\x12\x1d\n" +
+ "\n" +
+ "session_id\x18\x01 \x01(\tR\tsessionId\x122\n" +
+ "\x15after_worker_sequence\x18\x02 \x01(\x04R\x13afterWorkerSequence\"\x9f\x01\n" +
+ "\x10MxCommandRequest\x12\x1d\n" +
+ "\n" +
+ "session_id\x18\x01 \x01(\tR\tsessionId\x122\n" +
+ "\x15client_correlation_id\x18\x02 \x01(\tR\x13clientCorrelationId\x128\n" +
+ "\acommand\x18\x03 \x01(\v2\x1e.mxaccess_gateway.v1.MxCommandR\acommand\"\xd5\x0e\n" +
+ "\tMxCommand\x126\n" +
+ "\x04kind\x18\x01 \x01(\x0e2\".mxaccess_gateway.v1.MxCommandKindR\x04kind\x12B\n" +
+ "\bregister\x18\n" +
+ " \x01(\v2$.mxaccess_gateway.v1.RegisterCommandH\x00R\bregister\x12H\n" +
+ "\n" +
+ "unregister\x18\v \x01(\v2&.mxaccess_gateway.v1.UnregisterCommandH\x00R\n" +
+ "unregister\x12@\n" +
+ "\badd_item\x18\f \x01(\v2#.mxaccess_gateway.v1.AddItemCommandH\x00R\aaddItem\x12C\n" +
+ "\tadd_item2\x18\r \x01(\v2$.mxaccess_gateway.v1.AddItem2CommandH\x00R\baddItem2\x12I\n" +
+ "\vremove_item\x18\x0e \x01(\v2&.mxaccess_gateway.v1.RemoveItemCommandH\x00R\n" +
+ "removeItem\x12<\n" +
+ "\x06advise\x18\x0f \x01(\v2\".mxaccess_gateway.v1.AdviseCommandH\x00R\x06advise\x12C\n" +
+ "\tun_advise\x18\x10 \x01(\v2$.mxaccess_gateway.v1.UnAdviseCommandH\x00R\bunAdvise\x12^\n" +
+ "\x12advise_supervisory\x18\x11 \x01(\v2-.mxaccess_gateway.v1.AdviseSupervisoryCommandH\x00R\x11adviseSupervisory\x12Y\n" +
+ "\x11add_buffered_item\x18\x12 \x01(\v2+.mxaccess_gateway.v1.AddBufferedItemCommandH\x00R\x0faddBufferedItem\x12x\n" +
+ "\x1cset_buffered_update_interval\x18\x13 \x01(\v25.mxaccess_gateway.v1.SetBufferedUpdateIntervalCommandH\x00R\x19setBufferedUpdateInterval\x12?\n" +
+ "\asuspend\x18\x14 \x01(\v2#.mxaccess_gateway.v1.SuspendCommandH\x00R\asuspend\x12B\n" +
+ "\bactivate\x18\x15 \x01(\v2$.mxaccess_gateway.v1.ActivateCommandH\x00R\bactivate\x129\n" +
+ "\x05write\x18\x16 \x01(\v2!.mxaccess_gateway.v1.WriteCommandH\x00R\x05write\x12<\n" +
+ "\x06write2\x18\x17 \x01(\v2\".mxaccess_gateway.v1.Write2CommandH\x00R\x06write2\x12O\n" +
+ "\rwrite_secured\x18\x18 \x01(\v2(.mxaccess_gateway.v1.WriteSecuredCommandH\x00R\fwriteSecured\x12R\n" +
+ "\x0ewrite_secured2\x18\x19 \x01(\v2).mxaccess_gateway.v1.WriteSecured2CommandH\x00R\rwriteSecured2\x12[\n" +
+ "\x11authenticate_user\x18\x1a \x01(\v2,.mxaccess_gateway.v1.AuthenticateUserCommandH\x00R\x10authenticateUser\x12`\n" +
+ "\x14archestra_user_to_id\x18\x1b \x01(\v2-.mxaccess_gateway.v1.ArchestrAUserToIdCommandH\x00R\x11archestraUserToId\x126\n" +
+ "\x04ping\x18d \x01(\v2 .mxaccess_gateway.v1.PingCommandH\x00R\x04ping\x12Y\n" +
+ "\x11get_session_state\x18e \x01(\v2+.mxaccess_gateway.v1.GetSessionStateCommandH\x00R\x0fgetSessionState\x12S\n" +
+ "\x0fget_worker_info\x18f \x01(\v2).mxaccess_gateway.v1.GetWorkerInfoCommandH\x00R\rgetWorkerInfo\x12L\n" +
+ "\fdrain_events\x18g \x01(\v2'.mxaccess_gateway.v1.DrainEventsCommandH\x00R\vdrainEvents\x12U\n" +
+ "\x0fshutdown_worker\x18h \x01(\v2*.mxaccess_gateway.v1.ShutdownWorkerCommandH\x00R\x0eshutdownWorkerB\t\n" +
+ "\apayload\"2\n" +
+ "\x0fRegisterCommand\x12\x1f\n" +
+ "\vclient_name\x18\x01 \x01(\tR\n" +
+ "clientName\"8\n" +
+ "\x11UnregisterCommand\x12#\n" +
+ "\rserver_handle\x18\x01 \x01(\x05R\fserverHandle\"^\n" +
+ "\x0eAddItemCommand\x12#\n" +
+ "\rserver_handle\x18\x01 \x01(\x05R\fserverHandle\x12'\n" +
+ "\x0fitem_definition\x18\x02 \x01(\tR\x0eitemDefinition\"\x82\x01\n" +
+ "\x0fAddItem2Command\x12#\n" +
+ "\rserver_handle\x18\x01 \x01(\x05R\fserverHandle\x12'\n" +
+ "\x0fitem_definition\x18\x02 \x01(\tR\x0eitemDefinition\x12!\n" +
+ "\fitem_context\x18\x03 \x01(\tR\vitemContext\"Y\n" +
+ "\x11RemoveItemCommand\x12#\n" +
+ "\rserver_handle\x18\x01 \x01(\x05R\fserverHandle\x12\x1f\n" +
+ "\vitem_handle\x18\x02 \x01(\x05R\n" +
+ "itemHandle\"U\n" +
+ "\rAdviseCommand\x12#\n" +
+ "\rserver_handle\x18\x01 \x01(\x05R\fserverHandle\x12\x1f\n" +
+ "\vitem_handle\x18\x02 \x01(\x05R\n" +
+ "itemHandle\"W\n" +
+ "\x0fUnAdviseCommand\x12#\n" +
+ "\rserver_handle\x18\x01 \x01(\x05R\fserverHandle\x12\x1f\n" +
+ "\vitem_handle\x18\x02 \x01(\x05R\n" +
+ "itemHandle\"`\n" +
+ "\x18AdviseSupervisoryCommand\x12#\n" +
+ "\rserver_handle\x18\x01 \x01(\x05R\fserverHandle\x12\x1f\n" +
+ "\vitem_handle\x18\x02 \x01(\x05R\n" +
+ "itemHandle\"\x89\x01\n" +
+ "\x16AddBufferedItemCommand\x12#\n" +
+ "\rserver_handle\x18\x01 \x01(\x05R\fserverHandle\x12'\n" +
+ "\x0fitem_definition\x18\x02 \x01(\tR\x0eitemDefinition\x12!\n" +
+ "\fitem_context\x18\x03 \x01(\tR\vitemContext\"\x89\x01\n" +
+ " SetBufferedUpdateIntervalCommand\x12#\n" +
+ "\rserver_handle\x18\x01 \x01(\x05R\fserverHandle\x12@\n" +
+ "\x1cupdate_interval_milliseconds\x18\x02 \x01(\x05R\x1aupdateIntervalMilliseconds\"V\n" +
+ "\x0eSuspendCommand\x12#\n" +
+ "\rserver_handle\x18\x01 \x01(\x05R\fserverHandle\x12\x1f\n" +
+ "\vitem_handle\x18\x02 \x01(\x05R\n" +
+ "itemHandle\"W\n" +
+ "\x0fActivateCommand\x12#\n" +
+ "\rserver_handle\x18\x01 \x01(\x05R\fserverHandle\x12\x1f\n" +
+ "\vitem_handle\x18\x02 \x01(\x05R\n" +
+ "itemHandle\"\xa1\x01\n" +
+ "\fWriteCommand\x12#\n" +
+ "\rserver_handle\x18\x01 \x01(\x05R\fserverHandle\x12\x1f\n" +
+ "\vitem_handle\x18\x02 \x01(\x05R\n" +
+ "itemHandle\x122\n" +
+ "\x05value\x18\x03 \x01(\v2\x1c.mxaccess_gateway.v1.MxValueR\x05value\x12\x17\n" +
+ "\auser_id\x18\x04 \x01(\x05R\x06userId\"\xe9\x01\n" +
+ "\rWrite2Command\x12#\n" +
+ "\rserver_handle\x18\x01 \x01(\x05R\fserverHandle\x12\x1f\n" +
+ "\vitem_handle\x18\x02 \x01(\x05R\n" +
+ "itemHandle\x122\n" +
+ "\x05value\x18\x03 \x01(\v2\x1c.mxaccess_gateway.v1.MxValueR\x05value\x12E\n" +
+ "\x0ftimestamp_value\x18\x04 \x01(\v2\x1c.mxaccess_gateway.v1.MxValueR\x0etimestampValue\x12\x17\n" +
+ "\auser_id\x18\x05 \x01(\x05R\x06userId\"\xe1\x01\n" +
+ "\x13WriteSecuredCommand\x12#\n" +
+ "\rserver_handle\x18\x01 \x01(\x05R\fserverHandle\x12\x1f\n" +
+ "\vitem_handle\x18\x02 \x01(\x05R\n" +
+ "itemHandle\x12&\n" +
+ "\x0fcurrent_user_id\x18\x03 \x01(\x05R\rcurrentUserId\x12(\n" +
+ "\x10verifier_user_id\x18\x04 \x01(\x05R\x0everifierUserId\x122\n" +
+ "\x05value\x18\x05 \x01(\v2\x1c.mxaccess_gateway.v1.MxValueR\x05value\"\xa9\x02\n" +
+ "\x14WriteSecured2Command\x12#\n" +
+ "\rserver_handle\x18\x01 \x01(\x05R\fserverHandle\x12\x1f\n" +
+ "\vitem_handle\x18\x02 \x01(\x05R\n" +
+ "itemHandle\x12&\n" +
+ "\x0fcurrent_user_id\x18\x03 \x01(\x05R\rcurrentUserId\x12(\n" +
+ "\x10verifier_user_id\x18\x04 \x01(\x05R\x0everifierUserId\x122\n" +
+ "\x05value\x18\x05 \x01(\v2\x1c.mxaccess_gateway.v1.MxValueR\x05value\x12E\n" +
+ "\x0ftimestamp_value\x18\x06 \x01(\v2\x1c.mxaccess_gateway.v1.MxValueR\x0etimestampValue\"\x91\x01\n" +
+ "\x17AuthenticateUserCommand\x12#\n" +
+ "\rserver_handle\x18\x01 \x01(\x05R\fserverHandle\x12\x1f\n" +
+ "\vverify_user\x18\x02 \x01(\tR\n" +
+ "verifyUser\x120\n" +
+ "\x14verify_user_password\x18\x03 \x01(\tR\x12verifyUserPassword\"a\n" +
+ "\x18ArchestrAUserToIdCommand\x12#\n" +
+ "\rserver_handle\x18\x01 \x01(\x05R\fserverHandle\x12 \n" +
+ "\fuser_id_guid\x18\x02 \x01(\tR\n" +
+ "userIdGuid\"'\n" +
+ "\vPingCommand\x12\x18\n" +
+ "\amessage\x18\x01 \x01(\tR\amessage\"\x18\n" +
+ "\x16GetSessionStateCommand\"\x16\n" +
+ "\x14GetWorkerInfoCommand\"3\n" +
+ "\x12DrainEventsCommand\x12\x1d\n" +
+ "\n" +
+ "max_events\x18\x01 \x01(\rR\tmaxEvents\"U\n" +
+ "\x15ShutdownWorkerCommand\x12<\n" +
+ "\fgrace_period\x18\x01 \x01(\v2\x19.google.protobuf.DurationR\vgracePeriod\"\x80\n" +
+ "\n" +
+ "\x0eMxCommandReply\x12\x1d\n" +
+ "\n" +
+ "session_id\x18\x01 \x01(\tR\tsessionId\x12%\n" +
+ "\x0ecorrelation_id\x18\x02 \x01(\tR\rcorrelationId\x126\n" +
+ "\x04kind\x18\x03 \x01(\x0e2\".mxaccess_gateway.v1.MxCommandKindR\x04kind\x12L\n" +
+ "\x0fprotocol_status\x18\x04 \x01(\v2#.mxaccess_gateway.v1.ProtocolStatusR\x0eprotocolStatus\x12\x1d\n" +
+ "\ahresult\x18\x05 \x01(\x05H\x01R\ahresult\x88\x01\x01\x12?\n" +
+ "\freturn_value\x18\x06 \x01(\v2\x1c.mxaccess_gateway.v1.MxValueR\vreturnValue\x12>\n" +
+ "\bstatuses\x18\a \x03(\v2\".mxaccess_gateway.v1.MxStatusProxyR\bstatuses\x12-\n" +
+ "\x12diagnostic_message\x18\b \x01(\tR\x11diagnosticMessage\x12@\n" +
+ "\bregister\x18\x14 \x01(\v2\".mxaccess_gateway.v1.RegisterReplyH\x00R\bregister\x12>\n" +
+ "\badd_item\x18\x15 \x01(\v2!.mxaccess_gateway.v1.AddItemReplyH\x00R\aaddItem\x12A\n" +
+ "\tadd_item2\x18\x16 \x01(\v2\".mxaccess_gateway.v1.AddItem2ReplyH\x00R\baddItem2\x12W\n" +
+ "\x11add_buffered_item\x18\x17 \x01(\v2).mxaccess_gateway.v1.AddBufferedItemReplyH\x00R\x0faddBufferedItem\x12=\n" +
+ "\asuspend\x18\x18 \x01(\v2!.mxaccess_gateway.v1.SuspendReplyH\x00R\asuspend\x12@\n" +
+ "\bactivate\x18\x19 \x01(\v2\".mxaccess_gateway.v1.ActivateReplyH\x00R\bactivate\x12Y\n" +
+ "\x11authenticate_user\x18\x1a \x01(\v2*.mxaccess_gateway.v1.AuthenticateUserReplyH\x00R\x10authenticateUser\x12^\n" +
+ "\x14archestra_user_to_id\x18\x1b \x01(\v2+.mxaccess_gateway.v1.ArchestrAUserToIdReplyH\x00R\x11archestraUserToId\x12M\n" +
+ "\rsession_state\x18d \x01(\v2&.mxaccess_gateway.v1.SessionStateReplyH\x00R\fsessionState\x12G\n" +
+ "\vworker_info\x18e \x01(\v2$.mxaccess_gateway.v1.WorkerInfoReplyH\x00R\n" +
+ "workerInfo\x12J\n" +
+ "\fdrain_events\x18f \x01(\v2%.mxaccess_gateway.v1.DrainEventsReplyH\x00R\vdrainEventsB\t\n" +
+ "\apayloadB\n" +
+ "\n" +
+ "\b_hresult\"4\n" +
+ "\rRegisterReply\x12#\n" +
+ "\rserver_handle\x18\x01 \x01(\x05R\fserverHandle\"/\n" +
+ "\fAddItemReply\x12\x1f\n" +
+ "\vitem_handle\x18\x01 \x01(\x05R\n" +
+ "itemHandle\"0\n" +
+ "\rAddItem2Reply\x12\x1f\n" +
+ "\vitem_handle\x18\x01 \x01(\x05R\n" +
+ "itemHandle\"7\n" +
+ "\x14AddBufferedItemReply\x12\x1f\n" +
+ "\vitem_handle\x18\x01 \x01(\x05R\n" +
+ "itemHandle\"J\n" +
+ "\fSuspendReply\x12:\n" +
+ "\x06status\x18\x01 \x01(\v2\".mxaccess_gateway.v1.MxStatusProxyR\x06status\"K\n" +
+ "\rActivateReply\x12:\n" +
+ "\x06status\x18\x01 \x01(\v2\".mxaccess_gateway.v1.MxStatusProxyR\x06status\"0\n" +
+ "\x15AuthenticateUserReply\x12\x17\n" +
+ "\auser_id\x18\x01 \x01(\x05R\x06userId\"1\n" +
+ "\x16ArchestrAUserToIdReply\x12\x17\n" +
+ "\auser_id\x18\x01 \x01(\x05R\x06userId\"L\n" +
+ "\x11SessionStateReply\x127\n" +
+ "\x05state\x18\x01 \x01(\x0e2!.mxaccess_gateway.v1.SessionStateR\x05state\"\xb4\x01\n" +
+ "\x0fWorkerInfoReply\x12*\n" +
+ "\x11worker_process_id\x18\x01 \x01(\x05R\x0fworkerProcessId\x12%\n" +
+ "\x0eworker_version\x18\x02 \x01(\tR\rworkerVersion\x12'\n" +
+ "\x0fmxaccess_progid\x18\x03 \x01(\tR\x0emxaccessProgid\x12%\n" +
+ "\x0emxaccess_clsid\x18\x04 \x01(\tR\rmxaccessClsid\"H\n" +
+ "\x10DrainEventsReply\x124\n" +
+ "\x06events\x18\x01 \x03(\v2\x1c.mxaccess_gateway.v1.MxEventR\x06events\"\x89\b\n" +
+ "\aMxEvent\x12:\n" +
+ "\x06family\x18\x01 \x01(\x0e2\".mxaccess_gateway.v1.MxEventFamilyR\x06family\x12\x1d\n" +
+ "\n" +
+ "session_id\x18\x02 \x01(\tR\tsessionId\x12#\n" +
+ "\rserver_handle\x18\x03 \x01(\x05R\fserverHandle\x12\x1f\n" +
+ "\vitem_handle\x18\x04 \x01(\x05R\n" +
+ "itemHandle\x122\n" +
+ "\x05value\x18\x05 \x01(\v2\x1c.mxaccess_gateway.v1.MxValueR\x05value\x12\x18\n" +
+ "\aquality\x18\x06 \x01(\x05R\aquality\x12E\n" +
+ "\x10source_timestamp\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\x0fsourceTimestamp\x12>\n" +
+ "\bstatuses\x18\b \x03(\v2\".mxaccess_gateway.v1.MxStatusProxyR\bstatuses\x12'\n" +
+ "\x0fworker_sequence\x18\t \x01(\x04R\x0eworkerSequence\x12E\n" +
+ "\x10worker_timestamp\x18\n" +
+ " \x01(\v2\x1a.google.protobuf.TimestampR\x0fworkerTimestamp\x12V\n" +
+ "\x19gateway_receive_timestamp\x18\v \x01(\v2\x1a.google.protobuf.TimestampR\x17gatewayReceiveTimestamp\x12\x1d\n" +
+ "\ahresult\x18\f \x01(\x05H\x01R\ahresult\x88\x01\x01\x12\x1d\n" +
+ "\n" +
+ "raw_status\x18\r \x01(\tR\trawStatus\x12N\n" +
+ "\x0eon_data_change\x18\x14 \x01(\v2&.mxaccess_gateway.v1.OnDataChangeEventH\x00R\fonDataChange\x12W\n" +
+ "\x11on_write_complete\x18\x15 \x01(\v2).mxaccess_gateway.v1.OnWriteCompleteEventH\x00R\x0fonWriteComplete\x12\\\n" +
+ "\x12operation_complete\x18\x16 \x01(\v2+.mxaccess_gateway.v1.OperationCompleteEventH\x00R\x11operationComplete\x12g\n" +
+ "\x17on_buffered_data_change\x18\x17 \x01(\v2..mxaccess_gateway.v1.OnBufferedDataChangeEventH\x00R\x14onBufferedDataChangeB\x06\n" +
+ "\x04bodyB\n" +
+ "\n" +
+ "\b_hresult\"\x13\n" +
+ "\x11OnDataChangeEvent\"\x16\n" +
+ "\x14OnWriteCompleteEvent\"\x18\n" +
+ "\x16OperationCompleteEvent\"\x8b\x02\n" +
+ "\x19OnBufferedDataChangeEvent\x12<\n" +
+ "\tdata_type\x18\x01 \x01(\x0e2\x1f.mxaccess_gateway.v1.MxDataTypeR\bdataType\x12C\n" +
+ "\x0equality_values\x18\x02 \x01(\v2\x1c.mxaccess_gateway.v1.MxArrayR\rqualityValues\x12G\n" +
+ "\x10timestamp_values\x18\x03 \x01(\v2\x1c.mxaccess_gateway.v1.MxArrayR\x0ftimestampValues\x12\"\n" +
+ "\rraw_data_type\x18\x04 \x01(\x05R\vrawDataType\"\xbe\x02\n" +
+ "\rMxStatusProxy\x12\x18\n" +
+ "\asuccess\x18\x01 \x01(\x05R\asuccess\x12A\n" +
+ "\bcategory\x18\x02 \x01(\x0e2%.mxaccess_gateway.v1.MxStatusCategoryR\bcategory\x12D\n" +
+ "\vdetected_by\x18\x03 \x01(\x0e2#.mxaccess_gateway.v1.MxStatusSourceR\n" +
+ "detectedBy\x12\x16\n" +
+ "\x06detail\x18\x04 \x01(\x05R\x06detail\x12!\n" +
+ "\fraw_category\x18\x05 \x01(\x05R\vrawCategory\x12&\n" +
+ "\x0fraw_detected_by\x18\x06 \x01(\x05R\rrawDetectedBy\x12'\n" +
+ "\x0fdiagnostic_text\x18\a \x01(\tR\x0ediagnosticText\"\xd1\x04\n" +
+ "\aMxValue\x12<\n" +
+ "\tdata_type\x18\x01 \x01(\x0e2\x1f.mxaccess_gateway.v1.MxDataTypeR\bdataType\x12!\n" +
+ "\fvariant_type\x18\x02 \x01(\tR\vvariantType\x12\x17\n" +
+ "\ais_null\x18\x03 \x01(\bR\x06isNull\x12%\n" +
+ "\x0eraw_diagnostic\x18\x04 \x01(\tR\rrawDiagnostic\x12\"\n" +
+ "\rraw_data_type\x18\x05 \x01(\x05R\vrawDataType\x12\x1f\n" +
+ "\n" +
+ "bool_value\x18\n" +
+ " \x01(\bH\x00R\tboolValue\x12!\n" +
+ "\vint32_value\x18\v \x01(\x05H\x00R\n" +
+ "int32Value\x12!\n" +
+ "\vint64_value\x18\f \x01(\x03H\x00R\n" +
+ "int64Value\x12!\n" +
+ "\vfloat_value\x18\r \x01(\x02H\x00R\n" +
+ "floatValue\x12#\n" +
+ "\fdouble_value\x18\x0e \x01(\x01H\x00R\vdoubleValue\x12#\n" +
+ "\fstring_value\x18\x0f \x01(\tH\x00R\vstringValue\x12E\n" +
+ "\x0ftimestamp_value\x18\x10 \x01(\v2\x1a.google.protobuf.TimestampH\x00R\x0etimestampValue\x12?\n" +
+ "\varray_value\x18\x11 \x01(\v2\x1c.mxaccess_gateway.v1.MxArrayH\x00R\n" +
+ "arrayValue\x12\x1d\n" +
+ "\traw_value\x18\x12 \x01(\fH\x00R\brawValueB\x06\n" +
+ "\x04kind\"\xb6\x06\n" +
+ "\aMxArray\x12K\n" +
+ "\x11element_data_type\x18\x01 \x01(\x0e2\x1f.mxaccess_gateway.v1.MxDataTypeR\x0felementDataType\x12!\n" +
+ "\fvariant_type\x18\x02 \x01(\tR\vvariantType\x12\x1e\n" +
+ "\n" +
+ "dimensions\x18\x03 \x03(\rR\n" +
+ "dimensions\x12%\n" +
+ "\x0eraw_diagnostic\x18\x04 \x01(\tR\rrawDiagnostic\x121\n" +
+ "\x15raw_element_data_type\x18\x05 \x01(\x05R\x12rawElementDataType\x12A\n" +
+ "\vbool_values\x18\n" +
+ " \x01(\v2\x1e.mxaccess_gateway.v1.BoolArrayH\x00R\n" +
+ "boolValues\x12D\n" +
+ "\fint32_values\x18\v \x01(\v2\x1f.mxaccess_gateway.v1.Int32ArrayH\x00R\vint32Values\x12D\n" +
+ "\fint64_values\x18\f \x01(\v2\x1f.mxaccess_gateway.v1.Int64ArrayH\x00R\vint64Values\x12D\n" +
+ "\ffloat_values\x18\r \x01(\v2\x1f.mxaccess_gateway.v1.FloatArrayH\x00R\vfloatValues\x12G\n" +
+ "\rdouble_values\x18\x0e \x01(\v2 .mxaccess_gateway.v1.DoubleArrayH\x00R\fdoubleValues\x12G\n" +
+ "\rstring_values\x18\x0f \x01(\v2 .mxaccess_gateway.v1.StringArrayH\x00R\fstringValues\x12P\n" +
+ "\x10timestamp_values\x18\x10 \x01(\v2#.mxaccess_gateway.v1.TimestampArrayH\x00R\x0ftimestampValues\x12>\n" +
+ "\n" +
+ "raw_values\x18\x11 \x01(\v2\x1d.mxaccess_gateway.v1.RawArrayH\x00R\trawValuesB\b\n" +
+ "\x06values\"#\n" +
+ "\tBoolArray\x12\x16\n" +
+ "\x06values\x18\x01 \x03(\bR\x06values\"$\n" +
+ "\n" +
+ "Int32Array\x12\x16\n" +
+ "\x06values\x18\x01 \x03(\x05R\x06values\"$\n" +
+ "\n" +
+ "Int64Array\x12\x16\n" +
+ "\x06values\x18\x01 \x03(\x03R\x06values\"$\n" +
+ "\n" +
+ "FloatArray\x12\x16\n" +
+ "\x06values\x18\x01 \x03(\x02R\x06values\"%\n" +
+ "\vDoubleArray\x12\x16\n" +
+ "\x06values\x18\x01 \x03(\x01R\x06values\"%\n" +
+ "\vStringArray\x12\x16\n" +
+ "\x06values\x18\x01 \x03(\tR\x06values\"D\n" +
+ "\x0eTimestampArray\x122\n" +
+ "\x06values\x18\x01 \x03(\v2\x1a.google.protobuf.TimestampR\x06values\"\"\n" +
+ "\bRawArray\x12\x16\n" +
+ "\x06values\x18\x01 \x03(\fR\x06values\"g\n" +
+ "\x0eProtocolStatus\x12;\n" +
+ "\x04code\x18\x01 \x01(\x0e2'.mxaccess_gateway.v1.ProtocolStatusCodeR\x04code\x12\x18\n" +
+ "\amessage\x18\x02 \x01(\tR\amessage*\xbf\x06\n" +
+ "\rMxCommandKind\x12\x1f\n" +
+ "\x1bMX_COMMAND_KIND_UNSPECIFIED\x10\x00\x12\x1c\n" +
+ "\x18MX_COMMAND_KIND_REGISTER\x10\x01\x12\x1e\n" +
+ "\x1aMX_COMMAND_KIND_UNREGISTER\x10\x02\x12\x1c\n" +
+ "\x18MX_COMMAND_KIND_ADD_ITEM\x10\x03\x12\x1d\n" +
+ "\x19MX_COMMAND_KIND_ADD_ITEM2\x10\x04\x12\x1f\n" +
+ "\x1bMX_COMMAND_KIND_REMOVE_ITEM\x10\x05\x12\x1a\n" +
+ "\x16MX_COMMAND_KIND_ADVISE\x10\x06\x12\x1d\n" +
+ "\x19MX_COMMAND_KIND_UN_ADVISE\x10\a\x12&\n" +
+ "\"MX_COMMAND_KIND_ADVISE_SUPERVISORY\x10\b\x12%\n" +
+ "!MX_COMMAND_KIND_ADD_BUFFERED_ITEM\x10\t\x120\n" +
+ ",MX_COMMAND_KIND_SET_BUFFERED_UPDATE_INTERVAL\x10\n" +
+ "\x12\x1b\n" +
+ "\x17MX_COMMAND_KIND_SUSPEND\x10\v\x12\x1c\n" +
+ "\x18MX_COMMAND_KIND_ACTIVATE\x10\f\x12\x19\n" +
+ "\x15MX_COMMAND_KIND_WRITE\x10\r\x12\x1a\n" +
+ "\x16MX_COMMAND_KIND_WRITE2\x10\x0e\x12!\n" +
+ "\x1dMX_COMMAND_KIND_WRITE_SECURED\x10\x0f\x12\"\n" +
+ "\x1eMX_COMMAND_KIND_WRITE_SECURED2\x10\x10\x12%\n" +
+ "!MX_COMMAND_KIND_AUTHENTICATE_USER\x10\x11\x12(\n" +
+ "$MX_COMMAND_KIND_ARCHESTRA_USER_TO_ID\x10\x12\x12\x18\n" +
+ "\x14MX_COMMAND_KIND_PING\x10d\x12%\n" +
+ "!MX_COMMAND_KIND_GET_SESSION_STATE\x10e\x12#\n" +
+ "\x1fMX_COMMAND_KIND_GET_WORKER_INFO\x10f\x12 \n" +
+ "\x1cMX_COMMAND_KIND_DRAIN_EVENTS\x10g\x12#\n" +
+ "\x1fMX_COMMAND_KIND_SHUTDOWN_WORKER\x10h*\xd0\x01\n" +
+ "\rMxEventFamily\x12\x1f\n" +
+ "\x1bMX_EVENT_FAMILY_UNSPECIFIED\x10\x00\x12\"\n" +
+ "\x1eMX_EVENT_FAMILY_ON_DATA_CHANGE\x10\x01\x12%\n" +
+ "!MX_EVENT_FAMILY_ON_WRITE_COMPLETE\x10\x02\x12&\n" +
+ "\"MX_EVENT_FAMILY_OPERATION_COMPLETE\x10\x03\x12+\n" +
+ "'MX_EVENT_FAMILY_ON_BUFFERED_DATA_CHANGE\x10\x04*\xa5\x03\n" +
+ "\x10MxStatusCategory\x12\"\n" +
+ "\x1eMX_STATUS_CATEGORY_UNSPECIFIED\x10\x00\x12\x1e\n" +
+ "\x1aMX_STATUS_CATEGORY_UNKNOWN\x10\x01\x12\x19\n" +
+ "\x15MX_STATUS_CATEGORY_OK\x10\x02\x12\x1e\n" +
+ "\x1aMX_STATUS_CATEGORY_PENDING\x10\x03\x12\x1e\n" +
+ "\x1aMX_STATUS_CATEGORY_WARNING\x10\x04\x12*\n" +
+ "&MX_STATUS_CATEGORY_COMMUNICATION_ERROR\x10\x05\x12*\n" +
+ "&MX_STATUS_CATEGORY_CONFIGURATION_ERROR\x10\x06\x12(\n" +
+ "$MX_STATUS_CATEGORY_OPERATIONAL_ERROR\x10\a\x12%\n" +
+ "!MX_STATUS_CATEGORY_SECURITY_ERROR\x10\b\x12%\n" +
+ "!MX_STATUS_CATEGORY_SOFTWARE_ERROR\x10\t\x12\"\n" +
+ "\x1eMX_STATUS_CATEGORY_OTHER_ERROR\x10\n" +
+ "*\xca\x02\n" +
+ "\x0eMxStatusSource\x12 \n" +
+ "\x1cMX_STATUS_SOURCE_UNSPECIFIED\x10\x00\x12\x1c\n" +
+ "\x18MX_STATUS_SOURCE_UNKNOWN\x10\x01\x12#\n" +
+ "\x1fMX_STATUS_SOURCE_REQUESTING_LMX\x10\x02\x12#\n" +
+ "\x1fMX_STATUS_SOURCE_RESPONDING_LMX\x10\x03\x12#\n" +
+ "\x1fMX_STATUS_SOURCE_REQUESTING_NMX\x10\x04\x12#\n" +
+ "\x1fMX_STATUS_SOURCE_RESPONDING_NMX\x10\x05\x121\n" +
+ "-MX_STATUS_SOURCE_REQUESTING_AUTOMATION_OBJECT\x10\x06\x121\n" +
+ "-MX_STATUS_SOURCE_RESPONDING_AUTOMATION_OBJECT\x10\a*\xdd\x04\n" +
+ "\n" +
+ "MxDataType\x12\x1c\n" +
+ "\x18MX_DATA_TYPE_UNSPECIFIED\x10\x00\x12\x18\n" +
+ "\x14MX_DATA_TYPE_UNKNOWN\x10\x01\x12\x18\n" +
+ "\x14MX_DATA_TYPE_NO_DATA\x10\x02\x12\x18\n" +
+ "\x14MX_DATA_TYPE_BOOLEAN\x10\x03\x12\x18\n" +
+ "\x14MX_DATA_TYPE_INTEGER\x10\x04\x12\x16\n" +
+ "\x12MX_DATA_TYPE_FLOAT\x10\x05\x12\x17\n" +
+ "\x13MX_DATA_TYPE_DOUBLE\x10\x06\x12\x17\n" +
+ "\x13MX_DATA_TYPE_STRING\x10\a\x12\x15\n" +
+ "\x11MX_DATA_TYPE_TIME\x10\b\x12\x1d\n" +
+ "\x19MX_DATA_TYPE_ELAPSED_TIME\x10\t\x12\x1f\n" +
+ "\x1bMX_DATA_TYPE_REFERENCE_TYPE\x10\n" +
+ "\x12\x1c\n" +
+ "\x18MX_DATA_TYPE_STATUS_TYPE\x10\v\x12\x15\n" +
+ "\x11MX_DATA_TYPE_ENUM\x10\f\x12-\n" +
+ ")MX_DATA_TYPE_SECURITY_CLASSIFICATION_ENUM\x10\r\x12\"\n" +
+ "\x1eMX_DATA_TYPE_DATA_QUALITY_TYPE\x10\x0e\x12\x1f\n" +
+ "\x1bMX_DATA_TYPE_QUALIFIED_ENUM\x10\x0f\x12!\n" +
+ "\x1dMX_DATA_TYPE_QUALIFIED_STRUCT\x10\x10\x12)\n" +
+ "%MX_DATA_TYPE_INTERNATIONALIZED_STRING\x10\x11\x12\x1b\n" +
+ "\x17MX_DATA_TYPE_BIG_STRING\x10\x12\x12\x14\n" +
+ "\x10MX_DATA_TYPE_END\x10\x13*\xa3\x03\n" +
+ "\x12ProtocolStatusCode\x12$\n" +
+ " PROTOCOL_STATUS_CODE_UNSPECIFIED\x10\x00\x12\x1b\n" +
+ "\x17PROTOCOL_STATUS_CODE_OK\x10\x01\x12(\n" +
+ "$PROTOCOL_STATUS_CODE_INVALID_REQUEST\x10\x02\x12*\n" +
+ "&PROTOCOL_STATUS_CODE_SESSION_NOT_FOUND\x10\x03\x12*\n" +
+ "&PROTOCOL_STATUS_CODE_SESSION_NOT_READY\x10\x04\x12+\n" +
+ "'PROTOCOL_STATUS_CODE_WORKER_UNAVAILABLE\x10\x05\x12 \n" +
+ "\x1cPROTOCOL_STATUS_CODE_TIMEOUT\x10\x06\x12!\n" +
+ "\x1dPROTOCOL_STATUS_CODE_CANCELED\x10\a\x12+\n" +
+ "'PROTOCOL_STATUS_CODE_PROTOCOL_VIOLATION\x10\b\x12)\n" +
+ "%PROTOCOL_STATUS_CODE_MXACCESS_FAILURE\x10\t*\xbf\x02\n" +
+ "\fSessionState\x12\x1d\n" +
+ "\x19SESSION_STATE_UNSPECIFIED\x10\x00\x12\x1a\n" +
+ "\x16SESSION_STATE_CREATING\x10\x01\x12!\n" +
+ "\x1dSESSION_STATE_STARTING_WORKER\x10\x02\x12\"\n" +
+ "\x1eSESSION_STATE_WAITING_FOR_PIPE\x10\x03\x12\x1d\n" +
+ "\x19SESSION_STATE_HANDSHAKING\x10\x04\x12%\n" +
+ "!SESSION_STATE_INITIALIZING_WORKER\x10\x05\x12\x17\n" +
+ "\x13SESSION_STATE_READY\x10\x06\x12\x19\n" +
+ "\x15SESSION_STATE_CLOSING\x10\a\x12\x18\n" +
+ "\x14SESSION_STATE_CLOSED\x10\b\x12\x19\n" +
+ "\x15SESSION_STATE_FAULTED\x10\t2\x82\x03\n" +
+ "\x0fMxAccessGateway\x12]\n" +
+ "\vOpenSession\x12'.mxaccess_gateway.v1.OpenSessionRequest\x1a%.mxaccess_gateway.v1.OpenSessionReply\x12`\n" +
+ "\fCloseSession\x12(.mxaccess_gateway.v1.CloseSessionRequest\x1a&.mxaccess_gateway.v1.CloseSessionReply\x12T\n" +
+ "\x06Invoke\x12%.mxaccess_gateway.v1.MxCommandRequest\x1a#.mxaccess_gateway.v1.MxCommandReply\x12X\n" +
+ "\fStreamEvents\x12(.mxaccess_gateway.v1.StreamEventsRequest\x1a\x1c.mxaccess_gateway.v1.MxEvent0\x01B\x1c\xaa\x02\x19MxGateway.Contracts.Protob\x06proto3"
+
+var (
+ file_mxaccess_gateway_proto_rawDescOnce sync.Once
+ file_mxaccess_gateway_proto_rawDescData []byte
+)
+
+func file_mxaccess_gateway_proto_rawDescGZIP() []byte {
+ file_mxaccess_gateway_proto_rawDescOnce.Do(func() {
+ file_mxaccess_gateway_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_mxaccess_gateway_proto_rawDesc), len(file_mxaccess_gateway_proto_rawDesc)))
+ })
+ return file_mxaccess_gateway_proto_rawDescData
+}
+
+var file_mxaccess_gateway_proto_enumTypes = make([]protoimpl.EnumInfo, 7)
+var file_mxaccess_gateway_proto_msgTypes = make([]protoimpl.MessageInfo, 59)
+var file_mxaccess_gateway_proto_goTypes = []any{
+ (MxCommandKind)(0), // 0: mxaccess_gateway.v1.MxCommandKind
+ (MxEventFamily)(0), // 1: mxaccess_gateway.v1.MxEventFamily
+ (MxStatusCategory)(0), // 2: mxaccess_gateway.v1.MxStatusCategory
+ (MxStatusSource)(0), // 3: mxaccess_gateway.v1.MxStatusSource
+ (MxDataType)(0), // 4: mxaccess_gateway.v1.MxDataType
+ (ProtocolStatusCode)(0), // 5: mxaccess_gateway.v1.ProtocolStatusCode
+ (SessionState)(0), // 6: mxaccess_gateway.v1.SessionState
+ (*OpenSessionRequest)(nil), // 7: mxaccess_gateway.v1.OpenSessionRequest
+ (*OpenSessionReply)(nil), // 8: mxaccess_gateway.v1.OpenSessionReply
+ (*CloseSessionRequest)(nil), // 9: mxaccess_gateway.v1.CloseSessionRequest
+ (*CloseSessionReply)(nil), // 10: mxaccess_gateway.v1.CloseSessionReply
+ (*StreamEventsRequest)(nil), // 11: mxaccess_gateway.v1.StreamEventsRequest
+ (*MxCommandRequest)(nil), // 12: mxaccess_gateway.v1.MxCommandRequest
+ (*MxCommand)(nil), // 13: mxaccess_gateway.v1.MxCommand
+ (*RegisterCommand)(nil), // 14: mxaccess_gateway.v1.RegisterCommand
+ (*UnregisterCommand)(nil), // 15: mxaccess_gateway.v1.UnregisterCommand
+ (*AddItemCommand)(nil), // 16: mxaccess_gateway.v1.AddItemCommand
+ (*AddItem2Command)(nil), // 17: mxaccess_gateway.v1.AddItem2Command
+ (*RemoveItemCommand)(nil), // 18: mxaccess_gateway.v1.RemoveItemCommand
+ (*AdviseCommand)(nil), // 19: mxaccess_gateway.v1.AdviseCommand
+ (*UnAdviseCommand)(nil), // 20: mxaccess_gateway.v1.UnAdviseCommand
+ (*AdviseSupervisoryCommand)(nil), // 21: mxaccess_gateway.v1.AdviseSupervisoryCommand
+ (*AddBufferedItemCommand)(nil), // 22: mxaccess_gateway.v1.AddBufferedItemCommand
+ (*SetBufferedUpdateIntervalCommand)(nil), // 23: mxaccess_gateway.v1.SetBufferedUpdateIntervalCommand
+ (*SuspendCommand)(nil), // 24: mxaccess_gateway.v1.SuspendCommand
+ (*ActivateCommand)(nil), // 25: mxaccess_gateway.v1.ActivateCommand
+ (*WriteCommand)(nil), // 26: mxaccess_gateway.v1.WriteCommand
+ (*Write2Command)(nil), // 27: mxaccess_gateway.v1.Write2Command
+ (*WriteSecuredCommand)(nil), // 28: mxaccess_gateway.v1.WriteSecuredCommand
+ (*WriteSecured2Command)(nil), // 29: mxaccess_gateway.v1.WriteSecured2Command
+ (*AuthenticateUserCommand)(nil), // 30: mxaccess_gateway.v1.AuthenticateUserCommand
+ (*ArchestrAUserToIdCommand)(nil), // 31: mxaccess_gateway.v1.ArchestrAUserToIdCommand
+ (*PingCommand)(nil), // 32: mxaccess_gateway.v1.PingCommand
+ (*GetSessionStateCommand)(nil), // 33: mxaccess_gateway.v1.GetSessionStateCommand
+ (*GetWorkerInfoCommand)(nil), // 34: mxaccess_gateway.v1.GetWorkerInfoCommand
+ (*DrainEventsCommand)(nil), // 35: mxaccess_gateway.v1.DrainEventsCommand
+ (*ShutdownWorkerCommand)(nil), // 36: mxaccess_gateway.v1.ShutdownWorkerCommand
+ (*MxCommandReply)(nil), // 37: mxaccess_gateway.v1.MxCommandReply
+ (*RegisterReply)(nil), // 38: mxaccess_gateway.v1.RegisterReply
+ (*AddItemReply)(nil), // 39: mxaccess_gateway.v1.AddItemReply
+ (*AddItem2Reply)(nil), // 40: mxaccess_gateway.v1.AddItem2Reply
+ (*AddBufferedItemReply)(nil), // 41: mxaccess_gateway.v1.AddBufferedItemReply
+ (*SuspendReply)(nil), // 42: mxaccess_gateway.v1.SuspendReply
+ (*ActivateReply)(nil), // 43: mxaccess_gateway.v1.ActivateReply
+ (*AuthenticateUserReply)(nil), // 44: mxaccess_gateway.v1.AuthenticateUserReply
+ (*ArchestrAUserToIdReply)(nil), // 45: mxaccess_gateway.v1.ArchestrAUserToIdReply
+ (*SessionStateReply)(nil), // 46: mxaccess_gateway.v1.SessionStateReply
+ (*WorkerInfoReply)(nil), // 47: mxaccess_gateway.v1.WorkerInfoReply
+ (*DrainEventsReply)(nil), // 48: mxaccess_gateway.v1.DrainEventsReply
+ (*MxEvent)(nil), // 49: mxaccess_gateway.v1.MxEvent
+ (*OnDataChangeEvent)(nil), // 50: mxaccess_gateway.v1.OnDataChangeEvent
+ (*OnWriteCompleteEvent)(nil), // 51: mxaccess_gateway.v1.OnWriteCompleteEvent
+ (*OperationCompleteEvent)(nil), // 52: mxaccess_gateway.v1.OperationCompleteEvent
+ (*OnBufferedDataChangeEvent)(nil), // 53: mxaccess_gateway.v1.OnBufferedDataChangeEvent
+ (*MxStatusProxy)(nil), // 54: mxaccess_gateway.v1.MxStatusProxy
+ (*MxValue)(nil), // 55: mxaccess_gateway.v1.MxValue
+ (*MxArray)(nil), // 56: mxaccess_gateway.v1.MxArray
+ (*BoolArray)(nil), // 57: mxaccess_gateway.v1.BoolArray
+ (*Int32Array)(nil), // 58: mxaccess_gateway.v1.Int32Array
+ (*Int64Array)(nil), // 59: mxaccess_gateway.v1.Int64Array
+ (*FloatArray)(nil), // 60: mxaccess_gateway.v1.FloatArray
+ (*DoubleArray)(nil), // 61: mxaccess_gateway.v1.DoubleArray
+ (*StringArray)(nil), // 62: mxaccess_gateway.v1.StringArray
+ (*TimestampArray)(nil), // 63: mxaccess_gateway.v1.TimestampArray
+ (*RawArray)(nil), // 64: mxaccess_gateway.v1.RawArray
+ (*ProtocolStatus)(nil), // 65: mxaccess_gateway.v1.ProtocolStatus
+ (*durationpb.Duration)(nil), // 66: google.protobuf.Duration
+ (*timestamppb.Timestamp)(nil), // 67: google.protobuf.Timestamp
+}
+var file_mxaccess_gateway_proto_depIdxs = []int32{
+ 66, // 0: mxaccess_gateway.v1.OpenSessionRequest.command_timeout:type_name -> google.protobuf.Duration
+ 66, // 1: mxaccess_gateway.v1.OpenSessionReply.default_command_timeout:type_name -> google.protobuf.Duration
+ 65, // 2: mxaccess_gateway.v1.OpenSessionReply.protocol_status:type_name -> mxaccess_gateway.v1.ProtocolStatus
+ 6, // 3: mxaccess_gateway.v1.CloseSessionReply.final_state:type_name -> mxaccess_gateway.v1.SessionState
+ 65, // 4: mxaccess_gateway.v1.CloseSessionReply.protocol_status:type_name -> mxaccess_gateway.v1.ProtocolStatus
+ 13, // 5: mxaccess_gateway.v1.MxCommandRequest.command:type_name -> mxaccess_gateway.v1.MxCommand
+ 0, // 6: mxaccess_gateway.v1.MxCommand.kind:type_name -> mxaccess_gateway.v1.MxCommandKind
+ 14, // 7: mxaccess_gateway.v1.MxCommand.register:type_name -> mxaccess_gateway.v1.RegisterCommand
+ 15, // 8: mxaccess_gateway.v1.MxCommand.unregister:type_name -> mxaccess_gateway.v1.UnregisterCommand
+ 16, // 9: mxaccess_gateway.v1.MxCommand.add_item:type_name -> mxaccess_gateway.v1.AddItemCommand
+ 17, // 10: mxaccess_gateway.v1.MxCommand.add_item2:type_name -> mxaccess_gateway.v1.AddItem2Command
+ 18, // 11: mxaccess_gateway.v1.MxCommand.remove_item:type_name -> mxaccess_gateway.v1.RemoveItemCommand
+ 19, // 12: mxaccess_gateway.v1.MxCommand.advise:type_name -> mxaccess_gateway.v1.AdviseCommand
+ 20, // 13: mxaccess_gateway.v1.MxCommand.un_advise:type_name -> mxaccess_gateway.v1.UnAdviseCommand
+ 21, // 14: mxaccess_gateway.v1.MxCommand.advise_supervisory:type_name -> mxaccess_gateway.v1.AdviseSupervisoryCommand
+ 22, // 15: mxaccess_gateway.v1.MxCommand.add_buffered_item:type_name -> mxaccess_gateway.v1.AddBufferedItemCommand
+ 23, // 16: mxaccess_gateway.v1.MxCommand.set_buffered_update_interval:type_name -> mxaccess_gateway.v1.SetBufferedUpdateIntervalCommand
+ 24, // 17: mxaccess_gateway.v1.MxCommand.suspend:type_name -> mxaccess_gateway.v1.SuspendCommand
+ 25, // 18: mxaccess_gateway.v1.MxCommand.activate:type_name -> mxaccess_gateway.v1.ActivateCommand
+ 26, // 19: mxaccess_gateway.v1.MxCommand.write:type_name -> mxaccess_gateway.v1.WriteCommand
+ 27, // 20: mxaccess_gateway.v1.MxCommand.write2:type_name -> mxaccess_gateway.v1.Write2Command
+ 28, // 21: mxaccess_gateway.v1.MxCommand.write_secured:type_name -> mxaccess_gateway.v1.WriteSecuredCommand
+ 29, // 22: mxaccess_gateway.v1.MxCommand.write_secured2:type_name -> mxaccess_gateway.v1.WriteSecured2Command
+ 30, // 23: mxaccess_gateway.v1.MxCommand.authenticate_user:type_name -> mxaccess_gateway.v1.AuthenticateUserCommand
+ 31, // 24: mxaccess_gateway.v1.MxCommand.archestra_user_to_id:type_name -> mxaccess_gateway.v1.ArchestrAUserToIdCommand
+ 32, // 25: mxaccess_gateway.v1.MxCommand.ping:type_name -> mxaccess_gateway.v1.PingCommand
+ 33, // 26: mxaccess_gateway.v1.MxCommand.get_session_state:type_name -> mxaccess_gateway.v1.GetSessionStateCommand
+ 34, // 27: mxaccess_gateway.v1.MxCommand.get_worker_info:type_name -> mxaccess_gateway.v1.GetWorkerInfoCommand
+ 35, // 28: mxaccess_gateway.v1.MxCommand.drain_events:type_name -> mxaccess_gateway.v1.DrainEventsCommand
+ 36, // 29: mxaccess_gateway.v1.MxCommand.shutdown_worker:type_name -> mxaccess_gateway.v1.ShutdownWorkerCommand
+ 55, // 30: mxaccess_gateway.v1.WriteCommand.value:type_name -> mxaccess_gateway.v1.MxValue
+ 55, // 31: mxaccess_gateway.v1.Write2Command.value:type_name -> mxaccess_gateway.v1.MxValue
+ 55, // 32: mxaccess_gateway.v1.Write2Command.timestamp_value:type_name -> mxaccess_gateway.v1.MxValue
+ 55, // 33: mxaccess_gateway.v1.WriteSecuredCommand.value:type_name -> mxaccess_gateway.v1.MxValue
+ 55, // 34: mxaccess_gateway.v1.WriteSecured2Command.value:type_name -> mxaccess_gateway.v1.MxValue
+ 55, // 35: mxaccess_gateway.v1.WriteSecured2Command.timestamp_value:type_name -> mxaccess_gateway.v1.MxValue
+ 66, // 36: mxaccess_gateway.v1.ShutdownWorkerCommand.grace_period:type_name -> google.protobuf.Duration
+ 0, // 37: mxaccess_gateway.v1.MxCommandReply.kind:type_name -> mxaccess_gateway.v1.MxCommandKind
+ 65, // 38: mxaccess_gateway.v1.MxCommandReply.protocol_status:type_name -> mxaccess_gateway.v1.ProtocolStatus
+ 55, // 39: mxaccess_gateway.v1.MxCommandReply.return_value:type_name -> mxaccess_gateway.v1.MxValue
+ 54, // 40: mxaccess_gateway.v1.MxCommandReply.statuses:type_name -> mxaccess_gateway.v1.MxStatusProxy
+ 38, // 41: mxaccess_gateway.v1.MxCommandReply.register:type_name -> mxaccess_gateway.v1.RegisterReply
+ 39, // 42: mxaccess_gateway.v1.MxCommandReply.add_item:type_name -> mxaccess_gateway.v1.AddItemReply
+ 40, // 43: mxaccess_gateway.v1.MxCommandReply.add_item2:type_name -> mxaccess_gateway.v1.AddItem2Reply
+ 41, // 44: mxaccess_gateway.v1.MxCommandReply.add_buffered_item:type_name -> mxaccess_gateway.v1.AddBufferedItemReply
+ 42, // 45: mxaccess_gateway.v1.MxCommandReply.suspend:type_name -> mxaccess_gateway.v1.SuspendReply
+ 43, // 46: mxaccess_gateway.v1.MxCommandReply.activate:type_name -> mxaccess_gateway.v1.ActivateReply
+ 44, // 47: mxaccess_gateway.v1.MxCommandReply.authenticate_user:type_name -> mxaccess_gateway.v1.AuthenticateUserReply
+ 45, // 48: mxaccess_gateway.v1.MxCommandReply.archestra_user_to_id:type_name -> mxaccess_gateway.v1.ArchestrAUserToIdReply
+ 46, // 49: mxaccess_gateway.v1.MxCommandReply.session_state:type_name -> mxaccess_gateway.v1.SessionStateReply
+ 47, // 50: mxaccess_gateway.v1.MxCommandReply.worker_info:type_name -> mxaccess_gateway.v1.WorkerInfoReply
+ 48, // 51: mxaccess_gateway.v1.MxCommandReply.drain_events:type_name -> mxaccess_gateway.v1.DrainEventsReply
+ 54, // 52: mxaccess_gateway.v1.SuspendReply.status:type_name -> mxaccess_gateway.v1.MxStatusProxy
+ 54, // 53: mxaccess_gateway.v1.ActivateReply.status:type_name -> mxaccess_gateway.v1.MxStatusProxy
+ 6, // 54: mxaccess_gateway.v1.SessionStateReply.state:type_name -> mxaccess_gateway.v1.SessionState
+ 49, // 55: mxaccess_gateway.v1.DrainEventsReply.events:type_name -> mxaccess_gateway.v1.MxEvent
+ 1, // 56: mxaccess_gateway.v1.MxEvent.family:type_name -> mxaccess_gateway.v1.MxEventFamily
+ 55, // 57: mxaccess_gateway.v1.MxEvent.value:type_name -> mxaccess_gateway.v1.MxValue
+ 67, // 58: mxaccess_gateway.v1.MxEvent.source_timestamp:type_name -> google.protobuf.Timestamp
+ 54, // 59: mxaccess_gateway.v1.MxEvent.statuses:type_name -> mxaccess_gateway.v1.MxStatusProxy
+ 67, // 60: mxaccess_gateway.v1.MxEvent.worker_timestamp:type_name -> google.protobuf.Timestamp
+ 67, // 61: mxaccess_gateway.v1.MxEvent.gateway_receive_timestamp:type_name -> google.protobuf.Timestamp
+ 50, // 62: mxaccess_gateway.v1.MxEvent.on_data_change:type_name -> mxaccess_gateway.v1.OnDataChangeEvent
+ 51, // 63: mxaccess_gateway.v1.MxEvent.on_write_complete:type_name -> mxaccess_gateway.v1.OnWriteCompleteEvent
+ 52, // 64: mxaccess_gateway.v1.MxEvent.operation_complete:type_name -> mxaccess_gateway.v1.OperationCompleteEvent
+ 53, // 65: mxaccess_gateway.v1.MxEvent.on_buffered_data_change:type_name -> mxaccess_gateway.v1.OnBufferedDataChangeEvent
+ 4, // 66: mxaccess_gateway.v1.OnBufferedDataChangeEvent.data_type:type_name -> mxaccess_gateway.v1.MxDataType
+ 56, // 67: mxaccess_gateway.v1.OnBufferedDataChangeEvent.quality_values:type_name -> mxaccess_gateway.v1.MxArray
+ 56, // 68: mxaccess_gateway.v1.OnBufferedDataChangeEvent.timestamp_values:type_name -> mxaccess_gateway.v1.MxArray
+ 2, // 69: mxaccess_gateway.v1.MxStatusProxy.category:type_name -> mxaccess_gateway.v1.MxStatusCategory
+ 3, // 70: mxaccess_gateway.v1.MxStatusProxy.detected_by:type_name -> mxaccess_gateway.v1.MxStatusSource
+ 4, // 71: mxaccess_gateway.v1.MxValue.data_type:type_name -> mxaccess_gateway.v1.MxDataType
+ 67, // 72: mxaccess_gateway.v1.MxValue.timestamp_value:type_name -> google.protobuf.Timestamp
+ 56, // 73: mxaccess_gateway.v1.MxValue.array_value:type_name -> mxaccess_gateway.v1.MxArray
+ 4, // 74: mxaccess_gateway.v1.MxArray.element_data_type:type_name -> mxaccess_gateway.v1.MxDataType
+ 57, // 75: mxaccess_gateway.v1.MxArray.bool_values:type_name -> mxaccess_gateway.v1.BoolArray
+ 58, // 76: mxaccess_gateway.v1.MxArray.int32_values:type_name -> mxaccess_gateway.v1.Int32Array
+ 59, // 77: mxaccess_gateway.v1.MxArray.int64_values:type_name -> mxaccess_gateway.v1.Int64Array
+ 60, // 78: mxaccess_gateway.v1.MxArray.float_values:type_name -> mxaccess_gateway.v1.FloatArray
+ 61, // 79: mxaccess_gateway.v1.MxArray.double_values:type_name -> mxaccess_gateway.v1.DoubleArray
+ 62, // 80: mxaccess_gateway.v1.MxArray.string_values:type_name -> mxaccess_gateway.v1.StringArray
+ 63, // 81: mxaccess_gateway.v1.MxArray.timestamp_values:type_name -> mxaccess_gateway.v1.TimestampArray
+ 64, // 82: mxaccess_gateway.v1.MxArray.raw_values:type_name -> mxaccess_gateway.v1.RawArray
+ 67, // 83: mxaccess_gateway.v1.TimestampArray.values:type_name -> google.protobuf.Timestamp
+ 5, // 84: mxaccess_gateway.v1.ProtocolStatus.code:type_name -> mxaccess_gateway.v1.ProtocolStatusCode
+ 7, // 85: mxaccess_gateway.v1.MxAccessGateway.OpenSession:input_type -> mxaccess_gateway.v1.OpenSessionRequest
+ 9, // 86: mxaccess_gateway.v1.MxAccessGateway.CloseSession:input_type -> mxaccess_gateway.v1.CloseSessionRequest
+ 12, // 87: mxaccess_gateway.v1.MxAccessGateway.Invoke:input_type -> mxaccess_gateway.v1.MxCommandRequest
+ 11, // 88: mxaccess_gateway.v1.MxAccessGateway.StreamEvents:input_type -> mxaccess_gateway.v1.StreamEventsRequest
+ 8, // 89: mxaccess_gateway.v1.MxAccessGateway.OpenSession:output_type -> mxaccess_gateway.v1.OpenSessionReply
+ 10, // 90: mxaccess_gateway.v1.MxAccessGateway.CloseSession:output_type -> mxaccess_gateway.v1.CloseSessionReply
+ 37, // 91: mxaccess_gateway.v1.MxAccessGateway.Invoke:output_type -> mxaccess_gateway.v1.MxCommandReply
+ 49, // 92: mxaccess_gateway.v1.MxAccessGateway.StreamEvents:output_type -> mxaccess_gateway.v1.MxEvent
+ 89, // [89:93] is the sub-list for method output_type
+ 85, // [85:89] is the sub-list for method input_type
+ 85, // [85:85] is the sub-list for extension type_name
+ 85, // [85:85] is the sub-list for extension extendee
+ 0, // [0:85] is the sub-list for field type_name
+}
+
+func init() { file_mxaccess_gateway_proto_init() }
+func file_mxaccess_gateway_proto_init() {
+ if File_mxaccess_gateway_proto != nil {
+ return
+ }
+ file_mxaccess_gateway_proto_msgTypes[6].OneofWrappers = []any{
+ (*MxCommand_Register)(nil),
+ (*MxCommand_Unregister)(nil),
+ (*MxCommand_AddItem)(nil),
+ (*MxCommand_AddItem2)(nil),
+ (*MxCommand_RemoveItem)(nil),
+ (*MxCommand_Advise)(nil),
+ (*MxCommand_UnAdvise)(nil),
+ (*MxCommand_AdviseSupervisory)(nil),
+ (*MxCommand_AddBufferedItem)(nil),
+ (*MxCommand_SetBufferedUpdateInterval)(nil),
+ (*MxCommand_Suspend)(nil),
+ (*MxCommand_Activate)(nil),
+ (*MxCommand_Write)(nil),
+ (*MxCommand_Write2)(nil),
+ (*MxCommand_WriteSecured)(nil),
+ (*MxCommand_WriteSecured2)(nil),
+ (*MxCommand_AuthenticateUser)(nil),
+ (*MxCommand_ArchestraUserToId)(nil),
+ (*MxCommand_Ping)(nil),
+ (*MxCommand_GetSessionState)(nil),
+ (*MxCommand_GetWorkerInfo)(nil),
+ (*MxCommand_DrainEvents)(nil),
+ (*MxCommand_ShutdownWorker)(nil),
+ }
+ file_mxaccess_gateway_proto_msgTypes[30].OneofWrappers = []any{
+ (*MxCommandReply_Register)(nil),
+ (*MxCommandReply_AddItem)(nil),
+ (*MxCommandReply_AddItem2)(nil),
+ (*MxCommandReply_AddBufferedItem)(nil),
+ (*MxCommandReply_Suspend)(nil),
+ (*MxCommandReply_Activate)(nil),
+ (*MxCommandReply_AuthenticateUser)(nil),
+ (*MxCommandReply_ArchestraUserToId)(nil),
+ (*MxCommandReply_SessionState)(nil),
+ (*MxCommandReply_WorkerInfo)(nil),
+ (*MxCommandReply_DrainEvents)(nil),
+ }
+ file_mxaccess_gateway_proto_msgTypes[42].OneofWrappers = []any{
+ (*MxEvent_OnDataChange)(nil),
+ (*MxEvent_OnWriteComplete)(nil),
+ (*MxEvent_OperationComplete)(nil),
+ (*MxEvent_OnBufferedDataChange)(nil),
+ }
+ file_mxaccess_gateway_proto_msgTypes[48].OneofWrappers = []any{
+ (*MxValue_BoolValue)(nil),
+ (*MxValue_Int32Value)(nil),
+ (*MxValue_Int64Value)(nil),
+ (*MxValue_FloatValue)(nil),
+ (*MxValue_DoubleValue)(nil),
+ (*MxValue_StringValue)(nil),
+ (*MxValue_TimestampValue)(nil),
+ (*MxValue_ArrayValue)(nil),
+ (*MxValue_RawValue)(nil),
+ }
+ file_mxaccess_gateway_proto_msgTypes[49].OneofWrappers = []any{
+ (*MxArray_BoolValues)(nil),
+ (*MxArray_Int32Values)(nil),
+ (*MxArray_Int64Values)(nil),
+ (*MxArray_FloatValues)(nil),
+ (*MxArray_DoubleValues)(nil),
+ (*MxArray_StringValues)(nil),
+ (*MxArray_TimestampValues)(nil),
+ (*MxArray_RawValues)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_mxaccess_gateway_proto_rawDesc), len(file_mxaccess_gateway_proto_rawDesc)),
+ NumEnums: 7,
+ NumMessages: 59,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_mxaccess_gateway_proto_goTypes,
+ DependencyIndexes: file_mxaccess_gateway_proto_depIdxs,
+ EnumInfos: file_mxaccess_gateway_proto_enumTypes,
+ MessageInfos: file_mxaccess_gateway_proto_msgTypes,
+ }.Build()
+ File_mxaccess_gateway_proto = out.File
+ file_mxaccess_gateway_proto_goTypes = nil
+ file_mxaccess_gateway_proto_depIdxs = nil
+}
diff --git a/clients/go/internal/generated/mxaccess_gateway_grpc.pb.go b/clients/go/internal/generated/mxaccess_gateway_grpc.pb.go
new file mode 100644
index 0000000..6b3006c
--- /dev/null
+++ b/clients/go/internal/generated/mxaccess_gateway_grpc.pb.go
@@ -0,0 +1,243 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.6.1
+// - protoc v7.34.1
+// source: mxaccess_gateway.proto
+
+package generated
+
+import (
+ context "context"
+ grpc "google.golang.org/grpc"
+ codes "google.golang.org/grpc/codes"
+ status "google.golang.org/grpc/status"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
+
+const (
+ MxAccessGateway_OpenSession_FullMethodName = "/mxaccess_gateway.v1.MxAccessGateway/OpenSession"
+ MxAccessGateway_CloseSession_FullMethodName = "/mxaccess_gateway.v1.MxAccessGateway/CloseSession"
+ MxAccessGateway_Invoke_FullMethodName = "/mxaccess_gateway.v1.MxAccessGateway/Invoke"
+ MxAccessGateway_StreamEvents_FullMethodName = "/mxaccess_gateway.v1.MxAccessGateway/StreamEvents"
+)
+
+// MxAccessGatewayClient is the client API for MxAccessGateway service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+//
+// Public client API for MXAccess sessions hosted by the gateway.
+type MxAccessGatewayClient interface {
+ OpenSession(ctx context.Context, in *OpenSessionRequest, opts ...grpc.CallOption) (*OpenSessionReply, error)
+ CloseSession(ctx context.Context, in *CloseSessionRequest, opts ...grpc.CallOption) (*CloseSessionReply, error)
+ Invoke(ctx context.Context, in *MxCommandRequest, opts ...grpc.CallOption) (*MxCommandReply, error)
+ StreamEvents(ctx context.Context, in *StreamEventsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[MxEvent], error)
+}
+
+type mxAccessGatewayClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewMxAccessGatewayClient(cc grpc.ClientConnInterface) MxAccessGatewayClient {
+ return &mxAccessGatewayClient{cc}
+}
+
+func (c *mxAccessGatewayClient) OpenSession(ctx context.Context, in *OpenSessionRequest, opts ...grpc.CallOption) (*OpenSessionReply, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(OpenSessionReply)
+ err := c.cc.Invoke(ctx, MxAccessGateway_OpenSession_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *mxAccessGatewayClient) CloseSession(ctx context.Context, in *CloseSessionRequest, opts ...grpc.CallOption) (*CloseSessionReply, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(CloseSessionReply)
+ err := c.cc.Invoke(ctx, MxAccessGateway_CloseSession_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *mxAccessGatewayClient) Invoke(ctx context.Context, in *MxCommandRequest, opts ...grpc.CallOption) (*MxCommandReply, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(MxCommandReply)
+ err := c.cc.Invoke(ctx, MxAccessGateway_Invoke_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *mxAccessGatewayClient) StreamEvents(ctx context.Context, in *StreamEventsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[MxEvent], error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ stream, err := c.cc.NewStream(ctx, &MxAccessGateway_ServiceDesc.Streams[0], MxAccessGateway_StreamEvents_FullMethodName, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ x := &grpc.GenericClientStream[StreamEventsRequest, MxEvent]{ClientStream: stream}
+ if err := x.ClientStream.SendMsg(in); err != nil {
+ return nil, err
+ }
+ if err := x.ClientStream.CloseSend(); err != nil {
+ return nil, err
+ }
+ return x, nil
+}
+
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type MxAccessGateway_StreamEventsClient = grpc.ServerStreamingClient[MxEvent]
+
+// MxAccessGatewayServer is the server API for MxAccessGateway service.
+// All implementations must embed UnimplementedMxAccessGatewayServer
+// for forward compatibility.
+//
+// Public client API for MXAccess sessions hosted by the gateway.
+type MxAccessGatewayServer interface {
+ OpenSession(context.Context, *OpenSessionRequest) (*OpenSessionReply, error)
+ CloseSession(context.Context, *CloseSessionRequest) (*CloseSessionReply, error)
+ Invoke(context.Context, *MxCommandRequest) (*MxCommandReply, error)
+ StreamEvents(*StreamEventsRequest, grpc.ServerStreamingServer[MxEvent]) error
+ mustEmbedUnimplementedMxAccessGatewayServer()
+}
+
+// UnimplementedMxAccessGatewayServer must be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedMxAccessGatewayServer struct{}
+
+func (UnimplementedMxAccessGatewayServer) OpenSession(context.Context, *OpenSessionRequest) (*OpenSessionReply, error) {
+ return nil, status.Error(codes.Unimplemented, "method OpenSession not implemented")
+}
+func (UnimplementedMxAccessGatewayServer) CloseSession(context.Context, *CloseSessionRequest) (*CloseSessionReply, error) {
+ return nil, status.Error(codes.Unimplemented, "method CloseSession not implemented")
+}
+func (UnimplementedMxAccessGatewayServer) Invoke(context.Context, *MxCommandRequest) (*MxCommandReply, error) {
+ return nil, status.Error(codes.Unimplemented, "method Invoke not implemented")
+}
+func (UnimplementedMxAccessGatewayServer) StreamEvents(*StreamEventsRequest, grpc.ServerStreamingServer[MxEvent]) error {
+ return status.Error(codes.Unimplemented, "method StreamEvents not implemented")
+}
+func (UnimplementedMxAccessGatewayServer) mustEmbedUnimplementedMxAccessGatewayServer() {}
+func (UnimplementedMxAccessGatewayServer) testEmbeddedByValue() {}
+
+// UnsafeMxAccessGatewayServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to MxAccessGatewayServer will
+// result in compilation errors.
+type UnsafeMxAccessGatewayServer interface {
+ mustEmbedUnimplementedMxAccessGatewayServer()
+}
+
+func RegisterMxAccessGatewayServer(s grpc.ServiceRegistrar, srv MxAccessGatewayServer) {
+ // If the following call panics, it indicates UnimplementedMxAccessGatewayServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
+ s.RegisterService(&MxAccessGateway_ServiceDesc, srv)
+}
+
+func _MxAccessGateway_OpenSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(OpenSessionRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MxAccessGatewayServer).OpenSession(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MxAccessGateway_OpenSession_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MxAccessGatewayServer).OpenSession(ctx, req.(*OpenSessionRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MxAccessGateway_CloseSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(CloseSessionRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MxAccessGatewayServer).CloseSession(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MxAccessGateway_CloseSession_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MxAccessGatewayServer).CloseSession(ctx, req.(*CloseSessionRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MxAccessGateway_Invoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(MxCommandRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MxAccessGatewayServer).Invoke(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: MxAccessGateway_Invoke_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MxAccessGatewayServer).Invoke(ctx, req.(*MxCommandRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _MxAccessGateway_StreamEvents_Handler(srv interface{}, stream grpc.ServerStream) error {
+ m := new(StreamEventsRequest)
+ if err := stream.RecvMsg(m); err != nil {
+ return err
+ }
+ return srv.(MxAccessGatewayServer).StreamEvents(m, &grpc.GenericServerStream[StreamEventsRequest, MxEvent]{ServerStream: stream})
+}
+
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type MxAccessGateway_StreamEventsServer = grpc.ServerStreamingServer[MxEvent]
+
+// MxAccessGateway_ServiceDesc is the grpc.ServiceDesc for MxAccessGateway service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var MxAccessGateway_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "mxaccess_gateway.v1.MxAccessGateway",
+ HandlerType: (*MxAccessGatewayServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "OpenSession",
+ Handler: _MxAccessGateway_OpenSession_Handler,
+ },
+ {
+ MethodName: "CloseSession",
+ Handler: _MxAccessGateway_CloseSession_Handler,
+ },
+ {
+ MethodName: "Invoke",
+ Handler: _MxAccessGateway_Invoke_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{
+ {
+ StreamName: "StreamEvents",
+ Handler: _MxAccessGateway_StreamEvents_Handler,
+ ServerStreams: true,
+ },
+ },
+ Metadata: "mxaccess_gateway.proto",
+}
diff --git a/clients/go/internal/generated/mxaccess_worker.pb.go b/clients/go/internal/generated/mxaccess_worker.pb.go
new file mode 100644
index 0000000..54a06b3
--- /dev/null
+++ b/clients/go/internal/generated/mxaccess_worker.pb.go
@@ -0,0 +1,1289 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.36.11
+// protoc v7.34.1
+// source: mxaccess_worker.proto
+
+package generated
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ durationpb "google.golang.org/protobuf/types/known/durationpb"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ reflect "reflect"
+ sync "sync"
+ unsafe "unsafe"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type WorkerState int32
+
+const (
+ WorkerState_WORKER_STATE_UNSPECIFIED WorkerState = 0
+ WorkerState_WORKER_STATE_STARTING WorkerState = 1
+ WorkerState_WORKER_STATE_HANDSHAKING WorkerState = 2
+ WorkerState_WORKER_STATE_INITIALIZING_STA WorkerState = 3
+ WorkerState_WORKER_STATE_READY WorkerState = 4
+ WorkerState_WORKER_STATE_EXECUTING_COMMAND WorkerState = 5
+ WorkerState_WORKER_STATE_SHUTTING_DOWN WorkerState = 6
+ WorkerState_WORKER_STATE_STOPPED WorkerState = 7
+ WorkerState_WORKER_STATE_FAULTED WorkerState = 8
+)
+
+// Enum value maps for WorkerState.
+var (
+ WorkerState_name = map[int32]string{
+ 0: "WORKER_STATE_UNSPECIFIED",
+ 1: "WORKER_STATE_STARTING",
+ 2: "WORKER_STATE_HANDSHAKING",
+ 3: "WORKER_STATE_INITIALIZING_STA",
+ 4: "WORKER_STATE_READY",
+ 5: "WORKER_STATE_EXECUTING_COMMAND",
+ 6: "WORKER_STATE_SHUTTING_DOWN",
+ 7: "WORKER_STATE_STOPPED",
+ 8: "WORKER_STATE_FAULTED",
+ }
+ WorkerState_value = map[string]int32{
+ "WORKER_STATE_UNSPECIFIED": 0,
+ "WORKER_STATE_STARTING": 1,
+ "WORKER_STATE_HANDSHAKING": 2,
+ "WORKER_STATE_INITIALIZING_STA": 3,
+ "WORKER_STATE_READY": 4,
+ "WORKER_STATE_EXECUTING_COMMAND": 5,
+ "WORKER_STATE_SHUTTING_DOWN": 6,
+ "WORKER_STATE_STOPPED": 7,
+ "WORKER_STATE_FAULTED": 8,
+ }
+)
+
+func (x WorkerState) Enum() *WorkerState {
+ p := new(WorkerState)
+ *p = x
+ return p
+}
+
+func (x WorkerState) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (WorkerState) Descriptor() protoreflect.EnumDescriptor {
+ return file_mxaccess_worker_proto_enumTypes[0].Descriptor()
+}
+
+func (WorkerState) Type() protoreflect.EnumType {
+ return &file_mxaccess_worker_proto_enumTypes[0]
+}
+
+func (x WorkerState) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use WorkerState.Descriptor instead.
+func (WorkerState) EnumDescriptor() ([]byte, []int) {
+ return file_mxaccess_worker_proto_rawDescGZIP(), []int{0}
+}
+
+type WorkerFaultCategory int32
+
+const (
+ WorkerFaultCategory_WORKER_FAULT_CATEGORY_UNSPECIFIED WorkerFaultCategory = 0
+ WorkerFaultCategory_WORKER_FAULT_CATEGORY_INVALID_ARGUMENTS WorkerFaultCategory = 1
+ WorkerFaultCategory_WORKER_FAULT_CATEGORY_GATEWAY_AUTHENTICATION_FAILED WorkerFaultCategory = 2
+ WorkerFaultCategory_WORKER_FAULT_CATEGORY_PROTOCOL_MISMATCH WorkerFaultCategory = 3
+ WorkerFaultCategory_WORKER_FAULT_CATEGORY_PROTOCOL_VIOLATION WorkerFaultCategory = 4
+ WorkerFaultCategory_WORKER_FAULT_CATEGORY_PIPE_DISCONNECTED WorkerFaultCategory = 5
+ WorkerFaultCategory_WORKER_FAULT_CATEGORY_MXACCESS_CREATION_FAILED WorkerFaultCategory = 6
+ WorkerFaultCategory_WORKER_FAULT_CATEGORY_MXACCESS_COMMAND_FAILED WorkerFaultCategory = 7
+ WorkerFaultCategory_WORKER_FAULT_CATEGORY_MXACCESS_EVENT_CONVERSION_FAILED WorkerFaultCategory = 8
+ WorkerFaultCategory_WORKER_FAULT_CATEGORY_STA_HUNG WorkerFaultCategory = 9
+ WorkerFaultCategory_WORKER_FAULT_CATEGORY_QUEUE_OVERFLOW WorkerFaultCategory = 10
+ WorkerFaultCategory_WORKER_FAULT_CATEGORY_SHUTDOWN_TIMEOUT WorkerFaultCategory = 11
+)
+
+// Enum value maps for WorkerFaultCategory.
+var (
+ WorkerFaultCategory_name = map[int32]string{
+ 0: "WORKER_FAULT_CATEGORY_UNSPECIFIED",
+ 1: "WORKER_FAULT_CATEGORY_INVALID_ARGUMENTS",
+ 2: "WORKER_FAULT_CATEGORY_GATEWAY_AUTHENTICATION_FAILED",
+ 3: "WORKER_FAULT_CATEGORY_PROTOCOL_MISMATCH",
+ 4: "WORKER_FAULT_CATEGORY_PROTOCOL_VIOLATION",
+ 5: "WORKER_FAULT_CATEGORY_PIPE_DISCONNECTED",
+ 6: "WORKER_FAULT_CATEGORY_MXACCESS_CREATION_FAILED",
+ 7: "WORKER_FAULT_CATEGORY_MXACCESS_COMMAND_FAILED",
+ 8: "WORKER_FAULT_CATEGORY_MXACCESS_EVENT_CONVERSION_FAILED",
+ 9: "WORKER_FAULT_CATEGORY_STA_HUNG",
+ 10: "WORKER_FAULT_CATEGORY_QUEUE_OVERFLOW",
+ 11: "WORKER_FAULT_CATEGORY_SHUTDOWN_TIMEOUT",
+ }
+ WorkerFaultCategory_value = map[string]int32{
+ "WORKER_FAULT_CATEGORY_UNSPECIFIED": 0,
+ "WORKER_FAULT_CATEGORY_INVALID_ARGUMENTS": 1,
+ "WORKER_FAULT_CATEGORY_GATEWAY_AUTHENTICATION_FAILED": 2,
+ "WORKER_FAULT_CATEGORY_PROTOCOL_MISMATCH": 3,
+ "WORKER_FAULT_CATEGORY_PROTOCOL_VIOLATION": 4,
+ "WORKER_FAULT_CATEGORY_PIPE_DISCONNECTED": 5,
+ "WORKER_FAULT_CATEGORY_MXACCESS_CREATION_FAILED": 6,
+ "WORKER_FAULT_CATEGORY_MXACCESS_COMMAND_FAILED": 7,
+ "WORKER_FAULT_CATEGORY_MXACCESS_EVENT_CONVERSION_FAILED": 8,
+ "WORKER_FAULT_CATEGORY_STA_HUNG": 9,
+ "WORKER_FAULT_CATEGORY_QUEUE_OVERFLOW": 10,
+ "WORKER_FAULT_CATEGORY_SHUTDOWN_TIMEOUT": 11,
+ }
+)
+
+func (x WorkerFaultCategory) Enum() *WorkerFaultCategory {
+ p := new(WorkerFaultCategory)
+ *p = x
+ return p
+}
+
+func (x WorkerFaultCategory) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (WorkerFaultCategory) Descriptor() protoreflect.EnumDescriptor {
+ return file_mxaccess_worker_proto_enumTypes[1].Descriptor()
+}
+
+func (WorkerFaultCategory) Type() protoreflect.EnumType {
+ return &file_mxaccess_worker_proto_enumTypes[1]
+}
+
+func (x WorkerFaultCategory) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use WorkerFaultCategory.Descriptor instead.
+func (WorkerFaultCategory) EnumDescriptor() ([]byte, []int) {
+ return file_mxaccess_worker_proto_rawDescGZIP(), []int{1}
+}
+
+// Gateway-to-worker IPC envelope. Named-pipe framing prepends a little-endian
+// uint32 payload length to this protobuf payload.
+type WorkerEnvelope struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ProtocolVersion uint32 `protobuf:"varint,1,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"`
+ SessionId string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
+ Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"`
+ CorrelationId string `protobuf:"bytes,4,opt,name=correlation_id,json=correlationId,proto3" json:"correlation_id,omitempty"`
+ // Types that are valid to be assigned to Body:
+ //
+ // *WorkerEnvelope_GatewayHello
+ // *WorkerEnvelope_WorkerHello
+ // *WorkerEnvelope_WorkerReady
+ // *WorkerEnvelope_WorkerCommand
+ // *WorkerEnvelope_WorkerCommandReply
+ // *WorkerEnvelope_WorkerCancel
+ // *WorkerEnvelope_WorkerShutdown
+ // *WorkerEnvelope_WorkerShutdownAck
+ // *WorkerEnvelope_WorkerEvent
+ // *WorkerEnvelope_WorkerHeartbeat
+ // *WorkerEnvelope_WorkerFault
+ Body isWorkerEnvelope_Body `protobuf_oneof:"body"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *WorkerEnvelope) Reset() {
+ *x = WorkerEnvelope{}
+ mi := &file_mxaccess_worker_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *WorkerEnvelope) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WorkerEnvelope) ProtoMessage() {}
+
+func (x *WorkerEnvelope) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_worker_proto_msgTypes[0]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use WorkerEnvelope.ProtoReflect.Descriptor instead.
+func (*WorkerEnvelope) Descriptor() ([]byte, []int) {
+ return file_mxaccess_worker_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *WorkerEnvelope) GetProtocolVersion() uint32 {
+ if x != nil {
+ return x.ProtocolVersion
+ }
+ return 0
+}
+
+func (x *WorkerEnvelope) GetSessionId() string {
+ if x != nil {
+ return x.SessionId
+ }
+ return ""
+}
+
+func (x *WorkerEnvelope) GetSequence() uint64 {
+ if x != nil {
+ return x.Sequence
+ }
+ return 0
+}
+
+func (x *WorkerEnvelope) GetCorrelationId() string {
+ if x != nil {
+ return x.CorrelationId
+ }
+ return ""
+}
+
+func (x *WorkerEnvelope) GetBody() isWorkerEnvelope_Body {
+ if x != nil {
+ return x.Body
+ }
+ return nil
+}
+
+func (x *WorkerEnvelope) GetGatewayHello() *GatewayHello {
+ if x != nil {
+ if x, ok := x.Body.(*WorkerEnvelope_GatewayHello); ok {
+ return x.GatewayHello
+ }
+ }
+ return nil
+}
+
+func (x *WorkerEnvelope) GetWorkerHello() *WorkerHello {
+ if x != nil {
+ if x, ok := x.Body.(*WorkerEnvelope_WorkerHello); ok {
+ return x.WorkerHello
+ }
+ }
+ return nil
+}
+
+func (x *WorkerEnvelope) GetWorkerReady() *WorkerReady {
+ if x != nil {
+ if x, ok := x.Body.(*WorkerEnvelope_WorkerReady); ok {
+ return x.WorkerReady
+ }
+ }
+ return nil
+}
+
+func (x *WorkerEnvelope) GetWorkerCommand() *WorkerCommand {
+ if x != nil {
+ if x, ok := x.Body.(*WorkerEnvelope_WorkerCommand); ok {
+ return x.WorkerCommand
+ }
+ }
+ return nil
+}
+
+func (x *WorkerEnvelope) GetWorkerCommandReply() *WorkerCommandReply {
+ if x != nil {
+ if x, ok := x.Body.(*WorkerEnvelope_WorkerCommandReply); ok {
+ return x.WorkerCommandReply
+ }
+ }
+ return nil
+}
+
+func (x *WorkerEnvelope) GetWorkerCancel() *WorkerCancel {
+ if x != nil {
+ if x, ok := x.Body.(*WorkerEnvelope_WorkerCancel); ok {
+ return x.WorkerCancel
+ }
+ }
+ return nil
+}
+
+func (x *WorkerEnvelope) GetWorkerShutdown() *WorkerShutdown {
+ if x != nil {
+ if x, ok := x.Body.(*WorkerEnvelope_WorkerShutdown); ok {
+ return x.WorkerShutdown
+ }
+ }
+ return nil
+}
+
+func (x *WorkerEnvelope) GetWorkerShutdownAck() *WorkerShutdownAck {
+ if x != nil {
+ if x, ok := x.Body.(*WorkerEnvelope_WorkerShutdownAck); ok {
+ return x.WorkerShutdownAck
+ }
+ }
+ return nil
+}
+
+func (x *WorkerEnvelope) GetWorkerEvent() *WorkerEvent {
+ if x != nil {
+ if x, ok := x.Body.(*WorkerEnvelope_WorkerEvent); ok {
+ return x.WorkerEvent
+ }
+ }
+ return nil
+}
+
+func (x *WorkerEnvelope) GetWorkerHeartbeat() *WorkerHeartbeat {
+ if x != nil {
+ if x, ok := x.Body.(*WorkerEnvelope_WorkerHeartbeat); ok {
+ return x.WorkerHeartbeat
+ }
+ }
+ return nil
+}
+
+func (x *WorkerEnvelope) GetWorkerFault() *WorkerFault {
+ if x != nil {
+ if x, ok := x.Body.(*WorkerEnvelope_WorkerFault); ok {
+ return x.WorkerFault
+ }
+ }
+ return nil
+}
+
+type isWorkerEnvelope_Body interface {
+ isWorkerEnvelope_Body()
+}
+
+type WorkerEnvelope_GatewayHello struct {
+ GatewayHello *GatewayHello `protobuf:"bytes,10,opt,name=gateway_hello,json=gatewayHello,proto3,oneof"`
+}
+
+type WorkerEnvelope_WorkerHello struct {
+ WorkerHello *WorkerHello `protobuf:"bytes,11,opt,name=worker_hello,json=workerHello,proto3,oneof"`
+}
+
+type WorkerEnvelope_WorkerReady struct {
+ WorkerReady *WorkerReady `protobuf:"bytes,12,opt,name=worker_ready,json=workerReady,proto3,oneof"`
+}
+
+type WorkerEnvelope_WorkerCommand struct {
+ WorkerCommand *WorkerCommand `protobuf:"bytes,13,opt,name=worker_command,json=workerCommand,proto3,oneof"`
+}
+
+type WorkerEnvelope_WorkerCommandReply struct {
+ WorkerCommandReply *WorkerCommandReply `protobuf:"bytes,14,opt,name=worker_command_reply,json=workerCommandReply,proto3,oneof"`
+}
+
+type WorkerEnvelope_WorkerCancel struct {
+ WorkerCancel *WorkerCancel `protobuf:"bytes,15,opt,name=worker_cancel,json=workerCancel,proto3,oneof"`
+}
+
+type WorkerEnvelope_WorkerShutdown struct {
+ WorkerShutdown *WorkerShutdown `protobuf:"bytes,16,opt,name=worker_shutdown,json=workerShutdown,proto3,oneof"`
+}
+
+type WorkerEnvelope_WorkerShutdownAck struct {
+ WorkerShutdownAck *WorkerShutdownAck `protobuf:"bytes,17,opt,name=worker_shutdown_ack,json=workerShutdownAck,proto3,oneof"`
+}
+
+type WorkerEnvelope_WorkerEvent struct {
+ WorkerEvent *WorkerEvent `protobuf:"bytes,18,opt,name=worker_event,json=workerEvent,proto3,oneof"`
+}
+
+type WorkerEnvelope_WorkerHeartbeat struct {
+ WorkerHeartbeat *WorkerHeartbeat `protobuf:"bytes,19,opt,name=worker_heartbeat,json=workerHeartbeat,proto3,oneof"`
+}
+
+type WorkerEnvelope_WorkerFault struct {
+ WorkerFault *WorkerFault `protobuf:"bytes,20,opt,name=worker_fault,json=workerFault,proto3,oneof"`
+}
+
+func (*WorkerEnvelope_GatewayHello) isWorkerEnvelope_Body() {}
+
+func (*WorkerEnvelope_WorkerHello) isWorkerEnvelope_Body() {}
+
+func (*WorkerEnvelope_WorkerReady) isWorkerEnvelope_Body() {}
+
+func (*WorkerEnvelope_WorkerCommand) isWorkerEnvelope_Body() {}
+
+func (*WorkerEnvelope_WorkerCommandReply) isWorkerEnvelope_Body() {}
+
+func (*WorkerEnvelope_WorkerCancel) isWorkerEnvelope_Body() {}
+
+func (*WorkerEnvelope_WorkerShutdown) isWorkerEnvelope_Body() {}
+
+func (*WorkerEnvelope_WorkerShutdownAck) isWorkerEnvelope_Body() {}
+
+func (*WorkerEnvelope_WorkerEvent) isWorkerEnvelope_Body() {}
+
+func (*WorkerEnvelope_WorkerHeartbeat) isWorkerEnvelope_Body() {}
+
+func (*WorkerEnvelope_WorkerFault) isWorkerEnvelope_Body() {}
+
+type GatewayHello struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ SupportedProtocolVersion uint32 `protobuf:"varint,1,opt,name=supported_protocol_version,json=supportedProtocolVersion,proto3" json:"supported_protocol_version,omitempty"`
+ Nonce string `protobuf:"bytes,2,opt,name=nonce,proto3" json:"nonce,omitempty"`
+ GatewayVersion string `protobuf:"bytes,3,opt,name=gateway_version,json=gatewayVersion,proto3" json:"gateway_version,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GatewayHello) Reset() {
+ *x = GatewayHello{}
+ mi := &file_mxaccess_worker_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GatewayHello) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GatewayHello) ProtoMessage() {}
+
+func (x *GatewayHello) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_worker_proto_msgTypes[1]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GatewayHello.ProtoReflect.Descriptor instead.
+func (*GatewayHello) Descriptor() ([]byte, []int) {
+ return file_mxaccess_worker_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *GatewayHello) GetSupportedProtocolVersion() uint32 {
+ if x != nil {
+ return x.SupportedProtocolVersion
+ }
+ return 0
+}
+
+func (x *GatewayHello) GetNonce() string {
+ if x != nil {
+ return x.Nonce
+ }
+ return ""
+}
+
+func (x *GatewayHello) GetGatewayVersion() string {
+ if x != nil {
+ return x.GatewayVersion
+ }
+ return ""
+}
+
+type WorkerHello struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ProtocolVersion uint32 `protobuf:"varint,1,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"`
+ Nonce string `protobuf:"bytes,2,opt,name=nonce,proto3" json:"nonce,omitempty"`
+ WorkerProcessId int32 `protobuf:"varint,3,opt,name=worker_process_id,json=workerProcessId,proto3" json:"worker_process_id,omitempty"`
+ WorkerVersion string `protobuf:"bytes,4,opt,name=worker_version,json=workerVersion,proto3" json:"worker_version,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *WorkerHello) Reset() {
+ *x = WorkerHello{}
+ mi := &file_mxaccess_worker_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *WorkerHello) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WorkerHello) ProtoMessage() {}
+
+func (x *WorkerHello) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_worker_proto_msgTypes[2]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use WorkerHello.ProtoReflect.Descriptor instead.
+func (*WorkerHello) Descriptor() ([]byte, []int) {
+ return file_mxaccess_worker_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *WorkerHello) GetProtocolVersion() uint32 {
+ if x != nil {
+ return x.ProtocolVersion
+ }
+ return 0
+}
+
+func (x *WorkerHello) GetNonce() string {
+ if x != nil {
+ return x.Nonce
+ }
+ return ""
+}
+
+func (x *WorkerHello) GetWorkerProcessId() int32 {
+ if x != nil {
+ return x.WorkerProcessId
+ }
+ return 0
+}
+
+func (x *WorkerHello) GetWorkerVersion() string {
+ if x != nil {
+ return x.WorkerVersion
+ }
+ return ""
+}
+
+type WorkerReady struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ WorkerProcessId int32 `protobuf:"varint,1,opt,name=worker_process_id,json=workerProcessId,proto3" json:"worker_process_id,omitempty"`
+ MxaccessProgid string `protobuf:"bytes,2,opt,name=mxaccess_progid,json=mxaccessProgid,proto3" json:"mxaccess_progid,omitempty"`
+ MxaccessClsid string `protobuf:"bytes,3,opt,name=mxaccess_clsid,json=mxaccessClsid,proto3" json:"mxaccess_clsid,omitempty"`
+ ReadyTimestamp *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=ready_timestamp,json=readyTimestamp,proto3" json:"ready_timestamp,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *WorkerReady) Reset() {
+ *x = WorkerReady{}
+ mi := &file_mxaccess_worker_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *WorkerReady) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WorkerReady) ProtoMessage() {}
+
+func (x *WorkerReady) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_worker_proto_msgTypes[3]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use WorkerReady.ProtoReflect.Descriptor instead.
+func (*WorkerReady) Descriptor() ([]byte, []int) {
+ return file_mxaccess_worker_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *WorkerReady) GetWorkerProcessId() int32 {
+ if x != nil {
+ return x.WorkerProcessId
+ }
+ return 0
+}
+
+func (x *WorkerReady) GetMxaccessProgid() string {
+ if x != nil {
+ return x.MxaccessProgid
+ }
+ return ""
+}
+
+func (x *WorkerReady) GetMxaccessClsid() string {
+ if x != nil {
+ return x.MxaccessClsid
+ }
+ return ""
+}
+
+func (x *WorkerReady) GetReadyTimestamp() *timestamppb.Timestamp {
+ if x != nil {
+ return x.ReadyTimestamp
+ }
+ return nil
+}
+
+type WorkerCommand struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Command *MxCommand `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"`
+ EnqueueTimestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=enqueue_timestamp,json=enqueueTimestamp,proto3" json:"enqueue_timestamp,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *WorkerCommand) Reset() {
+ *x = WorkerCommand{}
+ mi := &file_mxaccess_worker_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *WorkerCommand) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WorkerCommand) ProtoMessage() {}
+
+func (x *WorkerCommand) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_worker_proto_msgTypes[4]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use WorkerCommand.ProtoReflect.Descriptor instead.
+func (*WorkerCommand) Descriptor() ([]byte, []int) {
+ return file_mxaccess_worker_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *WorkerCommand) GetCommand() *MxCommand {
+ if x != nil {
+ return x.Command
+ }
+ return nil
+}
+
+func (x *WorkerCommand) GetEnqueueTimestamp() *timestamppb.Timestamp {
+ if x != nil {
+ return x.EnqueueTimestamp
+ }
+ return nil
+}
+
+type WorkerCommandReply struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Reply *MxCommandReply `protobuf:"bytes,1,opt,name=reply,proto3" json:"reply,omitempty"`
+ CompletedTimestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=completed_timestamp,json=completedTimestamp,proto3" json:"completed_timestamp,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *WorkerCommandReply) Reset() {
+ *x = WorkerCommandReply{}
+ mi := &file_mxaccess_worker_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *WorkerCommandReply) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WorkerCommandReply) ProtoMessage() {}
+
+func (x *WorkerCommandReply) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_worker_proto_msgTypes[5]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use WorkerCommandReply.ProtoReflect.Descriptor instead.
+func (*WorkerCommandReply) Descriptor() ([]byte, []int) {
+ return file_mxaccess_worker_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *WorkerCommandReply) GetReply() *MxCommandReply {
+ if x != nil {
+ return x.Reply
+ }
+ return nil
+}
+
+func (x *WorkerCommandReply) GetCompletedTimestamp() *timestamppb.Timestamp {
+ if x != nil {
+ return x.CompletedTimestamp
+ }
+ return nil
+}
+
+type WorkerCancel struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Reason string `protobuf:"bytes,1,opt,name=reason,proto3" json:"reason,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *WorkerCancel) Reset() {
+ *x = WorkerCancel{}
+ mi := &file_mxaccess_worker_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *WorkerCancel) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WorkerCancel) ProtoMessage() {}
+
+func (x *WorkerCancel) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_worker_proto_msgTypes[6]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use WorkerCancel.ProtoReflect.Descriptor instead.
+func (*WorkerCancel) Descriptor() ([]byte, []int) {
+ return file_mxaccess_worker_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *WorkerCancel) GetReason() string {
+ if x != nil {
+ return x.Reason
+ }
+ return ""
+}
+
+type WorkerShutdown struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ GracePeriod *durationpb.Duration `protobuf:"bytes,1,opt,name=grace_period,json=gracePeriod,proto3" json:"grace_period,omitempty"`
+ Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *WorkerShutdown) Reset() {
+ *x = WorkerShutdown{}
+ mi := &file_mxaccess_worker_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *WorkerShutdown) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WorkerShutdown) ProtoMessage() {}
+
+func (x *WorkerShutdown) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_worker_proto_msgTypes[7]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use WorkerShutdown.ProtoReflect.Descriptor instead.
+func (*WorkerShutdown) Descriptor() ([]byte, []int) {
+ return file_mxaccess_worker_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *WorkerShutdown) GetGracePeriod() *durationpb.Duration {
+ if x != nil {
+ return x.GracePeriod
+ }
+ return nil
+}
+
+func (x *WorkerShutdown) GetReason() string {
+ if x != nil {
+ return x.Reason
+ }
+ return ""
+}
+
+type WorkerShutdownAck struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Status *ProtocolStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *WorkerShutdownAck) Reset() {
+ *x = WorkerShutdownAck{}
+ mi := &file_mxaccess_worker_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *WorkerShutdownAck) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WorkerShutdownAck) ProtoMessage() {}
+
+func (x *WorkerShutdownAck) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_worker_proto_msgTypes[8]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use WorkerShutdownAck.ProtoReflect.Descriptor instead.
+func (*WorkerShutdownAck) Descriptor() ([]byte, []int) {
+ return file_mxaccess_worker_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *WorkerShutdownAck) GetStatus() *ProtocolStatus {
+ if x != nil {
+ return x.Status
+ }
+ return nil
+}
+
+type WorkerEvent struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Event *MxEvent `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *WorkerEvent) Reset() {
+ *x = WorkerEvent{}
+ mi := &file_mxaccess_worker_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *WorkerEvent) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WorkerEvent) ProtoMessage() {}
+
+func (x *WorkerEvent) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_worker_proto_msgTypes[9]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use WorkerEvent.ProtoReflect.Descriptor instead.
+func (*WorkerEvent) Descriptor() ([]byte, []int) {
+ return file_mxaccess_worker_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *WorkerEvent) GetEvent() *MxEvent {
+ if x != nil {
+ return x.Event
+ }
+ return nil
+}
+
+type WorkerHeartbeat struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ WorkerProcessId int32 `protobuf:"varint,1,opt,name=worker_process_id,json=workerProcessId,proto3" json:"worker_process_id,omitempty"`
+ State WorkerState `protobuf:"varint,2,opt,name=state,proto3,enum=mxaccess_worker.v1.WorkerState" json:"state,omitempty"`
+ LastStaActivityTimestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=last_sta_activity_timestamp,json=lastStaActivityTimestamp,proto3" json:"last_sta_activity_timestamp,omitempty"`
+ PendingCommandCount uint32 `protobuf:"varint,4,opt,name=pending_command_count,json=pendingCommandCount,proto3" json:"pending_command_count,omitempty"`
+ OutboundEventQueueDepth uint32 `protobuf:"varint,5,opt,name=outbound_event_queue_depth,json=outboundEventQueueDepth,proto3" json:"outbound_event_queue_depth,omitempty"`
+ LastEventSequence uint64 `protobuf:"varint,6,opt,name=last_event_sequence,json=lastEventSequence,proto3" json:"last_event_sequence,omitempty"`
+ CurrentCommandCorrelationId string `protobuf:"bytes,7,opt,name=current_command_correlation_id,json=currentCommandCorrelationId,proto3" json:"current_command_correlation_id,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *WorkerHeartbeat) Reset() {
+ *x = WorkerHeartbeat{}
+ mi := &file_mxaccess_worker_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *WorkerHeartbeat) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WorkerHeartbeat) ProtoMessage() {}
+
+func (x *WorkerHeartbeat) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_worker_proto_msgTypes[10]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use WorkerHeartbeat.ProtoReflect.Descriptor instead.
+func (*WorkerHeartbeat) Descriptor() ([]byte, []int) {
+ return file_mxaccess_worker_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *WorkerHeartbeat) GetWorkerProcessId() int32 {
+ if x != nil {
+ return x.WorkerProcessId
+ }
+ return 0
+}
+
+func (x *WorkerHeartbeat) GetState() WorkerState {
+ if x != nil {
+ return x.State
+ }
+ return WorkerState_WORKER_STATE_UNSPECIFIED
+}
+
+func (x *WorkerHeartbeat) GetLastStaActivityTimestamp() *timestamppb.Timestamp {
+ if x != nil {
+ return x.LastStaActivityTimestamp
+ }
+ return nil
+}
+
+func (x *WorkerHeartbeat) GetPendingCommandCount() uint32 {
+ if x != nil {
+ return x.PendingCommandCount
+ }
+ return 0
+}
+
+func (x *WorkerHeartbeat) GetOutboundEventQueueDepth() uint32 {
+ if x != nil {
+ return x.OutboundEventQueueDepth
+ }
+ return 0
+}
+
+func (x *WorkerHeartbeat) GetLastEventSequence() uint64 {
+ if x != nil {
+ return x.LastEventSequence
+ }
+ return 0
+}
+
+func (x *WorkerHeartbeat) GetCurrentCommandCorrelationId() string {
+ if x != nil {
+ return x.CurrentCommandCorrelationId
+ }
+ return ""
+}
+
+type WorkerFault struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Category WorkerFaultCategory `protobuf:"varint,1,opt,name=category,proto3,enum=mxaccess_worker.v1.WorkerFaultCategory" json:"category,omitempty"`
+ CommandMethod string `protobuf:"bytes,2,opt,name=command_method,json=commandMethod,proto3" json:"command_method,omitempty"`
+ Hresult *int32 `protobuf:"varint,3,opt,name=hresult,proto3,oneof" json:"hresult,omitempty"`
+ ExceptionType string `protobuf:"bytes,4,opt,name=exception_type,json=exceptionType,proto3" json:"exception_type,omitempty"`
+ DiagnosticMessage string `protobuf:"bytes,5,opt,name=diagnostic_message,json=diagnosticMessage,proto3" json:"diagnostic_message,omitempty"`
+ ProtocolStatus *ProtocolStatus `protobuf:"bytes,6,opt,name=protocol_status,json=protocolStatus,proto3" json:"protocol_status,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *WorkerFault) Reset() {
+ *x = WorkerFault{}
+ mi := &file_mxaccess_worker_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *WorkerFault) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WorkerFault) ProtoMessage() {}
+
+func (x *WorkerFault) ProtoReflect() protoreflect.Message {
+ mi := &file_mxaccess_worker_proto_msgTypes[11]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use WorkerFault.ProtoReflect.Descriptor instead.
+func (*WorkerFault) Descriptor() ([]byte, []int) {
+ return file_mxaccess_worker_proto_rawDescGZIP(), []int{11}
+}
+
+func (x *WorkerFault) GetCategory() WorkerFaultCategory {
+ if x != nil {
+ return x.Category
+ }
+ return WorkerFaultCategory_WORKER_FAULT_CATEGORY_UNSPECIFIED
+}
+
+func (x *WorkerFault) GetCommandMethod() string {
+ if x != nil {
+ return x.CommandMethod
+ }
+ return ""
+}
+
+func (x *WorkerFault) GetHresult() int32 {
+ if x != nil && x.Hresult != nil {
+ return *x.Hresult
+ }
+ return 0
+}
+
+func (x *WorkerFault) GetExceptionType() string {
+ if x != nil {
+ return x.ExceptionType
+ }
+ return ""
+}
+
+func (x *WorkerFault) GetDiagnosticMessage() string {
+ if x != nil {
+ return x.DiagnosticMessage
+ }
+ return ""
+}
+
+func (x *WorkerFault) GetProtocolStatus() *ProtocolStatus {
+ if x != nil {
+ return x.ProtocolStatus
+ }
+ return nil
+}
+
+var File_mxaccess_worker_proto protoreflect.FileDescriptor
+
+const file_mxaccess_worker_proto_rawDesc = "" +
+ "\n" +
+ "\x15mxaccess_worker.proto\x12\x12mxaccess_worker.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16mxaccess_gateway.proto\"\xf1\a\n" +
+ "\x0eWorkerEnvelope\x12)\n" +
+ "\x10protocol_version\x18\x01 \x01(\rR\x0fprotocolVersion\x12\x1d\n" +
+ "\n" +
+ "session_id\x18\x02 \x01(\tR\tsessionId\x12\x1a\n" +
+ "\bsequence\x18\x03 \x01(\x04R\bsequence\x12%\n" +
+ "\x0ecorrelation_id\x18\x04 \x01(\tR\rcorrelationId\x12G\n" +
+ "\rgateway_hello\x18\n" +
+ " \x01(\v2 .mxaccess_worker.v1.GatewayHelloH\x00R\fgatewayHello\x12D\n" +
+ "\fworker_hello\x18\v \x01(\v2\x1f.mxaccess_worker.v1.WorkerHelloH\x00R\vworkerHello\x12D\n" +
+ "\fworker_ready\x18\f \x01(\v2\x1f.mxaccess_worker.v1.WorkerReadyH\x00R\vworkerReady\x12J\n" +
+ "\x0eworker_command\x18\r \x01(\v2!.mxaccess_worker.v1.WorkerCommandH\x00R\rworkerCommand\x12Z\n" +
+ "\x14worker_command_reply\x18\x0e \x01(\v2&.mxaccess_worker.v1.WorkerCommandReplyH\x00R\x12workerCommandReply\x12G\n" +
+ "\rworker_cancel\x18\x0f \x01(\v2 .mxaccess_worker.v1.WorkerCancelH\x00R\fworkerCancel\x12M\n" +
+ "\x0fworker_shutdown\x18\x10 \x01(\v2\".mxaccess_worker.v1.WorkerShutdownH\x00R\x0eworkerShutdown\x12W\n" +
+ "\x13worker_shutdown_ack\x18\x11 \x01(\v2%.mxaccess_worker.v1.WorkerShutdownAckH\x00R\x11workerShutdownAck\x12D\n" +
+ "\fworker_event\x18\x12 \x01(\v2\x1f.mxaccess_worker.v1.WorkerEventH\x00R\vworkerEvent\x12P\n" +
+ "\x10worker_heartbeat\x18\x13 \x01(\v2#.mxaccess_worker.v1.WorkerHeartbeatH\x00R\x0fworkerHeartbeat\x12D\n" +
+ "\fworker_fault\x18\x14 \x01(\v2\x1f.mxaccess_worker.v1.WorkerFaultH\x00R\vworkerFaultB\x06\n" +
+ "\x04body\"\x8b\x01\n" +
+ "\fGatewayHello\x12<\n" +
+ "\x1asupported_protocol_version\x18\x01 \x01(\rR\x18supportedProtocolVersion\x12\x14\n" +
+ "\x05nonce\x18\x02 \x01(\tR\x05nonce\x12'\n" +
+ "\x0fgateway_version\x18\x03 \x01(\tR\x0egatewayVersion\"\xa1\x01\n" +
+ "\vWorkerHello\x12)\n" +
+ "\x10protocol_version\x18\x01 \x01(\rR\x0fprotocolVersion\x12\x14\n" +
+ "\x05nonce\x18\x02 \x01(\tR\x05nonce\x12*\n" +
+ "\x11worker_process_id\x18\x03 \x01(\x05R\x0fworkerProcessId\x12%\n" +
+ "\x0eworker_version\x18\x04 \x01(\tR\rworkerVersion\"\xce\x01\n" +
+ "\vWorkerReady\x12*\n" +
+ "\x11worker_process_id\x18\x01 \x01(\x05R\x0fworkerProcessId\x12'\n" +
+ "\x0fmxaccess_progid\x18\x02 \x01(\tR\x0emxaccessProgid\x12%\n" +
+ "\x0emxaccess_clsid\x18\x03 \x01(\tR\rmxaccessClsid\x12C\n" +
+ "\x0fready_timestamp\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\x0ereadyTimestamp\"\x92\x01\n" +
+ "\rWorkerCommand\x128\n" +
+ "\acommand\x18\x01 \x01(\v2\x1e.mxaccess_gateway.v1.MxCommandR\acommand\x12G\n" +
+ "\x11enqueue_timestamp\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x10enqueueTimestamp\"\x9c\x01\n" +
+ "\x12WorkerCommandReply\x129\n" +
+ "\x05reply\x18\x01 \x01(\v2#.mxaccess_gateway.v1.MxCommandReplyR\x05reply\x12K\n" +
+ "\x13completed_timestamp\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x12completedTimestamp\"&\n" +
+ "\fWorkerCancel\x12\x16\n" +
+ "\x06reason\x18\x01 \x01(\tR\x06reason\"f\n" +
+ "\x0eWorkerShutdown\x12<\n" +
+ "\fgrace_period\x18\x01 \x01(\v2\x19.google.protobuf.DurationR\vgracePeriod\x12\x16\n" +
+ "\x06reason\x18\x02 \x01(\tR\x06reason\"P\n" +
+ "\x11WorkerShutdownAck\x12;\n" +
+ "\x06status\x18\x01 \x01(\v2#.mxaccess_gateway.v1.ProtocolStatusR\x06status\"A\n" +
+ "\vWorkerEvent\x122\n" +
+ "\x05event\x18\x01 \x01(\v2\x1c.mxaccess_gateway.v1.MxEventR\x05event\"\xb5\x03\n" +
+ "\x0fWorkerHeartbeat\x12*\n" +
+ "\x11worker_process_id\x18\x01 \x01(\x05R\x0fworkerProcessId\x125\n" +
+ "\x05state\x18\x02 \x01(\x0e2\x1f.mxaccess_worker.v1.WorkerStateR\x05state\x12Y\n" +
+ "\x1blast_sta_activity_timestamp\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\x18lastStaActivityTimestamp\x122\n" +
+ "\x15pending_command_count\x18\x04 \x01(\rR\x13pendingCommandCount\x12;\n" +
+ "\x1aoutbound_event_queue_depth\x18\x05 \x01(\rR\x17outboundEventQueueDepth\x12.\n" +
+ "\x13last_event_sequence\x18\x06 \x01(\x04R\x11lastEventSequence\x12C\n" +
+ "\x1ecurrent_command_correlation_id\x18\a \x01(\tR\x1bcurrentCommandCorrelationId\"\xc8\x02\n" +
+ "\vWorkerFault\x12C\n" +
+ "\bcategory\x18\x01 \x01(\x0e2'.mxaccess_worker.v1.WorkerFaultCategoryR\bcategory\x12%\n" +
+ "\x0ecommand_method\x18\x02 \x01(\tR\rcommandMethod\x12\x1d\n" +
+ "\ahresult\x18\x03 \x01(\x05H\x00R\ahresult\x88\x01\x01\x12%\n" +
+ "\x0eexception_type\x18\x04 \x01(\tR\rexceptionType\x12-\n" +
+ "\x12diagnostic_message\x18\x05 \x01(\tR\x11diagnosticMessage\x12L\n" +
+ "\x0fprotocol_status\x18\x06 \x01(\v2#.mxaccess_gateway.v1.ProtocolStatusR\x0eprotocolStatusB\n" +
+ "\n" +
+ "\b_hresult*\x97\x02\n" +
+ "\vWorkerState\x12\x1c\n" +
+ "\x18WORKER_STATE_UNSPECIFIED\x10\x00\x12\x19\n" +
+ "\x15WORKER_STATE_STARTING\x10\x01\x12\x1c\n" +
+ "\x18WORKER_STATE_HANDSHAKING\x10\x02\x12!\n" +
+ "\x1dWORKER_STATE_INITIALIZING_STA\x10\x03\x12\x16\n" +
+ "\x12WORKER_STATE_READY\x10\x04\x12\"\n" +
+ "\x1eWORKER_STATE_EXECUTING_COMMAND\x10\x05\x12\x1e\n" +
+ "\x1aWORKER_STATE_SHUTTING_DOWN\x10\x06\x12\x18\n" +
+ "\x14WORKER_STATE_STOPPED\x10\a\x12\x18\n" +
+ "\x14WORKER_STATE_FAULTED\x10\b*\xc7\x04\n" +
+ "\x13WorkerFaultCategory\x12%\n" +
+ "!WORKER_FAULT_CATEGORY_UNSPECIFIED\x10\x00\x12+\n" +
+ "'WORKER_FAULT_CATEGORY_INVALID_ARGUMENTS\x10\x01\x127\n" +
+ "3WORKER_FAULT_CATEGORY_GATEWAY_AUTHENTICATION_FAILED\x10\x02\x12+\n" +
+ "'WORKER_FAULT_CATEGORY_PROTOCOL_MISMATCH\x10\x03\x12,\n" +
+ "(WORKER_FAULT_CATEGORY_PROTOCOL_VIOLATION\x10\x04\x12+\n" +
+ "'WORKER_FAULT_CATEGORY_PIPE_DISCONNECTED\x10\x05\x122\n" +
+ ".WORKER_FAULT_CATEGORY_MXACCESS_CREATION_FAILED\x10\x06\x121\n" +
+ "-WORKER_FAULT_CATEGORY_MXACCESS_COMMAND_FAILED\x10\a\x12:\n" +
+ "6WORKER_FAULT_CATEGORY_MXACCESS_EVENT_CONVERSION_FAILED\x10\b\x12\"\n" +
+ "\x1eWORKER_FAULT_CATEGORY_STA_HUNG\x10\t\x12(\n" +
+ "$WORKER_FAULT_CATEGORY_QUEUE_OVERFLOW\x10\n" +
+ "\x12*\n" +
+ "&WORKER_FAULT_CATEGORY_SHUTDOWN_TIMEOUT\x10\vB\x1c\xaa\x02\x19MxGateway.Contracts.Protob\x06proto3"
+
+var (
+ file_mxaccess_worker_proto_rawDescOnce sync.Once
+ file_mxaccess_worker_proto_rawDescData []byte
+)
+
+func file_mxaccess_worker_proto_rawDescGZIP() []byte {
+ file_mxaccess_worker_proto_rawDescOnce.Do(func() {
+ file_mxaccess_worker_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_mxaccess_worker_proto_rawDesc), len(file_mxaccess_worker_proto_rawDesc)))
+ })
+ return file_mxaccess_worker_proto_rawDescData
+}
+
+var file_mxaccess_worker_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
+var file_mxaccess_worker_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
+var file_mxaccess_worker_proto_goTypes = []any{
+ (WorkerState)(0), // 0: mxaccess_worker.v1.WorkerState
+ (WorkerFaultCategory)(0), // 1: mxaccess_worker.v1.WorkerFaultCategory
+ (*WorkerEnvelope)(nil), // 2: mxaccess_worker.v1.WorkerEnvelope
+ (*GatewayHello)(nil), // 3: mxaccess_worker.v1.GatewayHello
+ (*WorkerHello)(nil), // 4: mxaccess_worker.v1.WorkerHello
+ (*WorkerReady)(nil), // 5: mxaccess_worker.v1.WorkerReady
+ (*WorkerCommand)(nil), // 6: mxaccess_worker.v1.WorkerCommand
+ (*WorkerCommandReply)(nil), // 7: mxaccess_worker.v1.WorkerCommandReply
+ (*WorkerCancel)(nil), // 8: mxaccess_worker.v1.WorkerCancel
+ (*WorkerShutdown)(nil), // 9: mxaccess_worker.v1.WorkerShutdown
+ (*WorkerShutdownAck)(nil), // 10: mxaccess_worker.v1.WorkerShutdownAck
+ (*WorkerEvent)(nil), // 11: mxaccess_worker.v1.WorkerEvent
+ (*WorkerHeartbeat)(nil), // 12: mxaccess_worker.v1.WorkerHeartbeat
+ (*WorkerFault)(nil), // 13: mxaccess_worker.v1.WorkerFault
+ (*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp
+ (*MxCommand)(nil), // 15: mxaccess_gateway.v1.MxCommand
+ (*MxCommandReply)(nil), // 16: mxaccess_gateway.v1.MxCommandReply
+ (*durationpb.Duration)(nil), // 17: google.protobuf.Duration
+ (*ProtocolStatus)(nil), // 18: mxaccess_gateway.v1.ProtocolStatus
+ (*MxEvent)(nil), // 19: mxaccess_gateway.v1.MxEvent
+}
+var file_mxaccess_worker_proto_depIdxs = []int32{
+ 3, // 0: mxaccess_worker.v1.WorkerEnvelope.gateway_hello:type_name -> mxaccess_worker.v1.GatewayHello
+ 4, // 1: mxaccess_worker.v1.WorkerEnvelope.worker_hello:type_name -> mxaccess_worker.v1.WorkerHello
+ 5, // 2: mxaccess_worker.v1.WorkerEnvelope.worker_ready:type_name -> mxaccess_worker.v1.WorkerReady
+ 6, // 3: mxaccess_worker.v1.WorkerEnvelope.worker_command:type_name -> mxaccess_worker.v1.WorkerCommand
+ 7, // 4: mxaccess_worker.v1.WorkerEnvelope.worker_command_reply:type_name -> mxaccess_worker.v1.WorkerCommandReply
+ 8, // 5: mxaccess_worker.v1.WorkerEnvelope.worker_cancel:type_name -> mxaccess_worker.v1.WorkerCancel
+ 9, // 6: mxaccess_worker.v1.WorkerEnvelope.worker_shutdown:type_name -> mxaccess_worker.v1.WorkerShutdown
+ 10, // 7: mxaccess_worker.v1.WorkerEnvelope.worker_shutdown_ack:type_name -> mxaccess_worker.v1.WorkerShutdownAck
+ 11, // 8: mxaccess_worker.v1.WorkerEnvelope.worker_event:type_name -> mxaccess_worker.v1.WorkerEvent
+ 12, // 9: mxaccess_worker.v1.WorkerEnvelope.worker_heartbeat:type_name -> mxaccess_worker.v1.WorkerHeartbeat
+ 13, // 10: mxaccess_worker.v1.WorkerEnvelope.worker_fault:type_name -> mxaccess_worker.v1.WorkerFault
+ 14, // 11: mxaccess_worker.v1.WorkerReady.ready_timestamp:type_name -> google.protobuf.Timestamp
+ 15, // 12: mxaccess_worker.v1.WorkerCommand.command:type_name -> mxaccess_gateway.v1.MxCommand
+ 14, // 13: mxaccess_worker.v1.WorkerCommand.enqueue_timestamp:type_name -> google.protobuf.Timestamp
+ 16, // 14: mxaccess_worker.v1.WorkerCommandReply.reply:type_name -> mxaccess_gateway.v1.MxCommandReply
+ 14, // 15: mxaccess_worker.v1.WorkerCommandReply.completed_timestamp:type_name -> google.protobuf.Timestamp
+ 17, // 16: mxaccess_worker.v1.WorkerShutdown.grace_period:type_name -> google.protobuf.Duration
+ 18, // 17: mxaccess_worker.v1.WorkerShutdownAck.status:type_name -> mxaccess_gateway.v1.ProtocolStatus
+ 19, // 18: mxaccess_worker.v1.WorkerEvent.event:type_name -> mxaccess_gateway.v1.MxEvent
+ 0, // 19: mxaccess_worker.v1.WorkerHeartbeat.state:type_name -> mxaccess_worker.v1.WorkerState
+ 14, // 20: mxaccess_worker.v1.WorkerHeartbeat.last_sta_activity_timestamp:type_name -> google.protobuf.Timestamp
+ 1, // 21: mxaccess_worker.v1.WorkerFault.category:type_name -> mxaccess_worker.v1.WorkerFaultCategory
+ 18, // 22: mxaccess_worker.v1.WorkerFault.protocol_status:type_name -> mxaccess_gateway.v1.ProtocolStatus
+ 23, // [23:23] is the sub-list for method output_type
+ 23, // [23:23] is the sub-list for method input_type
+ 23, // [23:23] is the sub-list for extension type_name
+ 23, // [23:23] is the sub-list for extension extendee
+ 0, // [0:23] is the sub-list for field type_name
+}
+
+func init() { file_mxaccess_worker_proto_init() }
+func file_mxaccess_worker_proto_init() {
+ if File_mxaccess_worker_proto != nil {
+ return
+ }
+ file_mxaccess_gateway_proto_init()
+ file_mxaccess_worker_proto_msgTypes[0].OneofWrappers = []any{
+ (*WorkerEnvelope_GatewayHello)(nil),
+ (*WorkerEnvelope_WorkerHello)(nil),
+ (*WorkerEnvelope_WorkerReady)(nil),
+ (*WorkerEnvelope_WorkerCommand)(nil),
+ (*WorkerEnvelope_WorkerCommandReply)(nil),
+ (*WorkerEnvelope_WorkerCancel)(nil),
+ (*WorkerEnvelope_WorkerShutdown)(nil),
+ (*WorkerEnvelope_WorkerShutdownAck)(nil),
+ (*WorkerEnvelope_WorkerEvent)(nil),
+ (*WorkerEnvelope_WorkerHeartbeat)(nil),
+ (*WorkerEnvelope_WorkerFault)(nil),
+ }
+ file_mxaccess_worker_proto_msgTypes[11].OneofWrappers = []any{}
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_mxaccess_worker_proto_rawDesc), len(file_mxaccess_worker_proto_rawDesc)),
+ NumEnums: 2,
+ NumMessages: 12,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_mxaccess_worker_proto_goTypes,
+ DependencyIndexes: file_mxaccess_worker_proto_depIdxs,
+ EnumInfos: file_mxaccess_worker_proto_enumTypes,
+ MessageInfos: file_mxaccess_worker_proto_msgTypes,
+ }.Build()
+ File_mxaccess_worker_proto = out.File
+ file_mxaccess_worker_proto_goTypes = nil
+ file_mxaccess_worker_proto_depIdxs = nil
+}
diff --git a/clients/go/mxgateway/options.go b/clients/go/mxgateway/options.go
new file mode 100644
index 0000000..8d6bda6
--- /dev/null
+++ b/clients/go/mxgateway/options.go
@@ -0,0 +1,33 @@
+package mxgateway
+
+import "strings"
+
+// Options configures future gateway connections.
+type Options struct {
+ Endpoint string
+ APIKey string
+ Plaintext bool
+ CACertFile string
+ ServerNameOverride string
+}
+
+// RedactedAPIKey returns a display-safe representation of the configured API
+// key for diagnostics and CLI output.
+func (o Options) RedactedAPIKey() string {
+ return RedactAPIKey(o.APIKey)
+}
+
+// RedactAPIKey hides credential material while keeping enough shape for
+// troubleshooting whether a key was supplied.
+func RedactAPIKey(apiKey string) string {
+ if apiKey == "" {
+ return ""
+ }
+
+ if len(apiKey) <= 8 {
+ return ""
+ }
+
+ prefix, suffix := apiKey[:4], apiKey[len(apiKey)-4:]
+ return prefix + strings.Repeat("*", len(apiKey)-8) + suffix
+}
diff --git a/clients/go/mxgateway/options_test.go b/clients/go/mxgateway/options_test.go
new file mode 100644
index 0000000..38f3ad0
--- /dev/null
+++ b/clients/go/mxgateway/options_test.go
@@ -0,0 +1,23 @@
+package mxgateway
+
+import "testing"
+
+func TestRedactAPIKey(t *testing.T) {
+ tests := []struct {
+ name string
+ apiKey string
+ want string
+ }{
+ {name: "empty", apiKey: "", want: ""},
+ {name: "short", apiKey: "mxgw_1", want: ""},
+ {name: "long", apiKey: "mxgw_key_secret", want: "mxgw*******cret"},
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ if got := RedactAPIKey(tt.apiKey); got != tt.want {
+ t.Fatalf("RedactAPIKey() = %q, want %q", got, tt.want)
+ }
+ })
+ }
+}
diff --git a/clients/go/mxgateway/protofixtures_test.go b/clients/go/mxgateway/protofixtures_test.go
new file mode 100644
index 0000000..dc5014f
--- /dev/null
+++ b/clients/go/mxgateway/protofixtures_test.go
@@ -0,0 +1,69 @@
+package mxgateway
+
+import (
+ "os"
+ "path/filepath"
+ "testing"
+
+ pb "gitea.dohertylan.com/dohertj2/mxaccessgw/clients/go/internal/generated"
+ "google.golang.org/protobuf/encoding/protojson"
+ "google.golang.org/protobuf/proto"
+)
+
+func TestGeneratedGoldenFixturesParse(t *testing.T) {
+ tests := []struct {
+ name string
+ path string
+ msg proto.Message
+ }{
+ {
+ name: "open session reply",
+ path: filepath.Join("..", "..", "proto", "fixtures", "golden", "open-session-reply.ok.json"),
+ msg: &pb.OpenSessionReply{},
+ },
+ {
+ name: "register command request",
+ path: filepath.Join("..", "..", "proto", "fixtures", "golden", "register-command-request.json"),
+ msg: &pb.MxCommandRequest{},
+ },
+ {
+ name: "on data change event",
+ path: filepath.Join("..", "..", "proto", "fixtures", "golden", "on-data-change-event.json"),
+ msg: &pb.MxEvent{},
+ },
+ }
+
+ unmarshal := protojson.UnmarshalOptions{DiscardUnknown: false}
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ data, err := os.ReadFile(tt.path)
+ if err != nil {
+ t.Fatalf("read fixture: %v", err)
+ }
+
+ if err := unmarshal.Unmarshal(data, tt.msg); err != nil {
+ t.Fatalf("parse fixture: %v", err)
+ }
+ })
+ }
+}
+
+func TestOpenSessionFixtureProtocolVersions(t *testing.T) {
+ data, err := os.ReadFile(filepath.Join("..", "..", "proto", "fixtures", "golden", "open-session-reply.ok.json"))
+ if err != nil {
+ t.Fatalf("read fixture: %v", err)
+ }
+
+ var reply pb.OpenSessionReply
+ if err := protojson.Unmarshal(data, &reply); err != nil {
+ t.Fatalf("parse fixture: %v", err)
+ }
+
+ if reply.GetGatewayProtocolVersion() != GatewayProtocolVersion {
+ t.Fatalf("gateway protocol = %d, want %d", reply.GetGatewayProtocolVersion(), GatewayProtocolVersion)
+ }
+
+ if reply.GetWorkerProtocolVersion() != WorkerProtocolVersion {
+ t.Fatalf("worker protocol = %d, want %d", reply.GetWorkerProtocolVersion(), WorkerProtocolVersion)
+ }
+}
diff --git a/clients/go/mxgateway/version.go b/clients/go/mxgateway/version.go
new file mode 100644
index 0000000..66fd475
--- /dev/null
+++ b/clients/go/mxgateway/version.go
@@ -0,0 +1,15 @@
+package mxgateway
+
+const (
+ // ClientVersion identifies this Go client scaffold before package releases
+ // assign semantic versions.
+ ClientVersion = "0.1.0-dev"
+
+ // GatewayProtocolVersion matches GatewayContractInfo.GatewayProtocolVersion
+ // in the shared .NET contracts.
+ GatewayProtocolVersion uint32 = 1
+
+ // WorkerProtocolVersion matches GatewayContractInfo.WorkerProtocolVersion
+ // and is exposed for fake-worker and parity tests.
+ WorkerProtocolVersion uint32 = 1
+)
diff --git a/clients/proto/fixtures/behavior/auth/auth-error-cases.json b/clients/proto/fixtures/behavior/auth/auth-error-cases.json
new file mode 100644
index 0000000..804edbf
--- /dev/null
+++ b/clients/proto/fixtures/behavior/auth/auth-error-cases.json
@@ -0,0 +1,36 @@
+{
+ "schemaVersion": 1,
+ "cases": [
+ {
+ "id": "missing-api-key",
+ "grpcStatusCode": "UNAUTHENTICATED",
+ "clientErrorCategory": "AuthenticationError",
+ "inputMetadata": {
+ "authorization": ""
+ },
+ "expectedRedactedOutput": "authentication failed: missing bearer token",
+ "retryableWithoutCredentialChange": false
+ },
+ {
+ "id": "invalid-api-key",
+ "grpcStatusCode": "UNAUTHENTICATED",
+ "clientErrorCategory": "AuthenticationError",
+ "inputMetadata": {
+ "authorization": "Bearer "
+ },
+ "expectedRedactedOutput": "authentication failed: invalid API key ",
+ "retryableWithoutCredentialChange": false
+ },
+ {
+ "id": "missing-write-scope",
+ "grpcStatusCode": "PERMISSION_DENIED",
+ "clientErrorCategory": "AuthorizationError",
+ "inputMetadata": {
+ "authorization": "Bearer "
+ },
+ "requiredScope": "mxaccess.write",
+ "expectedRedactedOutput": "authorization failed: missing scope mxaccess.write",
+ "retryableWithoutCredentialChange": false
+ }
+ ]
+}
diff --git a/clients/proto/fixtures/behavior/command-replies/register.ok.reply.json b/clients/proto/fixtures/behavior/command-replies/register.ok.reply.json
new file mode 100644
index 0000000..c083db9
--- /dev/null
+++ b/clients/proto/fixtures/behavior/command-replies/register.ok.reply.json
@@ -0,0 +1,30 @@
+{
+ "sessionId": "session-fixture",
+ "correlationId": "gateway-correlation-register-1",
+ "kind": "MX_COMMAND_KIND_REGISTER",
+ "protocolStatus": {
+ "code": "PROTOCOL_STATUS_CODE_OK",
+ "message": "Register completed."
+ },
+ "hresult": 0,
+ "returnValue": {
+ "dataType": "MX_DATA_TYPE_INTEGER",
+ "variantType": "VT_I4",
+ "int32Value": 12
+ },
+ "statuses": [
+ {
+ "success": 1,
+ "category": "MX_STATUS_CATEGORY_OK",
+ "detectedBy": "MX_STATUS_SOURCE_RESPONDING_LMX",
+ "detail": 0,
+ "rawCategory": 0,
+ "rawDetectedBy": 0,
+ "diagnosticText": "OK"
+ }
+ ],
+ "diagnosticMessage": "COM Register returned server handle 12.",
+ "register": {
+ "serverHandle": 12
+ }
+}
diff --git a/clients/proto/fixtures/behavior/command-replies/write.mxaccess-failure.reply.json b/clients/proto/fixtures/behavior/command-replies/write.mxaccess-failure.reply.json
new file mode 100644
index 0000000..d57099b
--- /dev/null
+++ b/clients/proto/fixtures/behavior/command-replies/write.mxaccess-failure.reply.json
@@ -0,0 +1,38 @@
+{
+ "sessionId": "session-fixture",
+ "correlationId": "gateway-correlation-write-1",
+ "kind": "MX_COMMAND_KIND_WRITE",
+ "protocolStatus": {
+ "code": "PROTOCOL_STATUS_CODE_MXACCESS_FAILURE",
+ "message": "MXAccess rejected the write."
+ },
+ "hresult": -2147220992,
+ "returnValue": {
+ "dataType": "MX_DATA_TYPE_NO_DATA",
+ "variantType": "VT_EMPTY",
+ "isNull": true,
+ "rawDiagnostic": "MXAccess returned no value for the failed write.",
+ "rawDataType": 2
+ },
+ "statuses": [
+ {
+ "success": 0,
+ "category": "MX_STATUS_CATEGORY_SECURITY_ERROR",
+ "detectedBy": "MX_STATUS_SOURCE_RESPONDING_LMX",
+ "detail": 321,
+ "rawCategory": 8,
+ "rawDetectedBy": 3,
+ "diagnosticText": "Write denied by provider security."
+ },
+ {
+ "success": 0,
+ "category": "MX_STATUS_CATEGORY_OPERATIONAL_ERROR",
+ "detectedBy": "MX_STATUS_SOURCE_RESPONDING_NMX",
+ "detail": 902,
+ "rawCategory": 7,
+ "rawDetectedBy": 5,
+ "diagnosticText": "Provider rejected the item state."
+ }
+ ],
+ "diagnosticMessage": "Fixture preserves a data-bearing MXAccess failure reply with HRESULT and status array."
+}
diff --git a/clients/proto/fixtures/behavior/event-streams/session-event-stream.json b/clients/proto/fixtures/behavior/event-streams/session-event-stream.json
new file mode 100644
index 0000000..82fdad3
--- /dev/null
+++ b/clients/proto/fixtures/behavior/event-streams/session-event-stream.json
@@ -0,0 +1,159 @@
+{
+ "sessionId": "session-fixture",
+ "description": "Ordered event stream sample for one worker-backed session.",
+ "events": [
+ {
+ "family": "MX_EVENT_FAMILY_ON_DATA_CHANGE",
+ "sessionId": "session-fixture",
+ "serverHandle": 12,
+ "itemHandle": 34,
+ "value": {
+ "dataType": "MX_DATA_TYPE_INTEGER",
+ "variantType": "VT_I4",
+ "int32Value": 123
+ },
+ "quality": 192,
+ "sourceTimestamp": "2026-01-01T00:00:00Z",
+ "statuses": [
+ {
+ "success": 1,
+ "category": "MX_STATUS_CATEGORY_OK",
+ "detectedBy": "MX_STATUS_SOURCE_RESPONDING_LMX",
+ "detail": 0,
+ "rawCategory": 0,
+ "rawDetectedBy": 0,
+ "diagnosticText": "OK"
+ }
+ ],
+ "workerSequence": "1",
+ "workerTimestamp": "2026-01-01T00:00:00.010Z",
+ "gatewayReceiveTimestamp": "2026-01-01T00:00:00.015Z",
+ "onDataChange": {}
+ },
+ {
+ "family": "MX_EVENT_FAMILY_ON_WRITE_COMPLETE",
+ "sessionId": "session-fixture",
+ "serverHandle": 12,
+ "itemHandle": 34,
+ "value": {
+ "dataType": "MX_DATA_TYPE_DOUBLE",
+ "variantType": "VT_R8",
+ "doubleValue": 45.5
+ },
+ "quality": 192,
+ "sourceTimestamp": "2026-01-01T00:00:01Z",
+ "statuses": [
+ {
+ "success": 1,
+ "category": "MX_STATUS_CATEGORY_OK",
+ "detectedBy": "MX_STATUS_SOURCE_RESPONDING_LMX",
+ "detail": 0,
+ "rawCategory": 0,
+ "rawDetectedBy": 0,
+ "diagnosticText": "Write complete."
+ }
+ ],
+ "workerSequence": "2",
+ "workerTimestamp": "2026-01-01T00:00:01.010Z",
+ "gatewayReceiveTimestamp": "2026-01-01T00:00:01.015Z",
+ "hresult": 0,
+ "onWriteComplete": {}
+ },
+ {
+ "family": "MX_EVENT_FAMILY_OPERATION_COMPLETE",
+ "sessionId": "session-fixture",
+ "serverHandle": 12,
+ "itemHandle": 34,
+ "value": {
+ "dataType": "MX_DATA_TYPE_STRING",
+ "variantType": "VT_BSTR",
+ "stringValue": "operation-complete"
+ },
+ "quality": 192,
+ "sourceTimestamp": "2026-01-01T00:00:02Z",
+ "statuses": [
+ {
+ "success": 1,
+ "category": "MX_STATUS_CATEGORY_OK",
+ "detectedBy": "MX_STATUS_SOURCE_RESPONDING_NMX",
+ "detail": 0,
+ "rawCategory": 0,
+ "rawDetectedBy": 0,
+ "diagnosticText": "Operation complete."
+ }
+ ],
+ "workerSequence": "3",
+ "workerTimestamp": "2026-01-01T00:00:02.010Z",
+ "gatewayReceiveTimestamp": "2026-01-01T00:00:02.015Z",
+ "operationComplete": {}
+ },
+ {
+ "family": "MX_EVENT_FAMILY_ON_BUFFERED_DATA_CHANGE",
+ "sessionId": "session-fixture",
+ "serverHandle": 12,
+ "itemHandle": 34,
+ "value": {
+ "dataType": "MX_DATA_TYPE_FLOAT",
+ "arrayValue": {
+ "elementDataType": "MX_DATA_TYPE_FLOAT",
+ "variantType": "VT_ARRAY|VT_R4",
+ "dimensions": [
+ 2
+ ],
+ "floatValues": {
+ "values": [
+ 1.5,
+ 2.5
+ ]
+ }
+ }
+ },
+ "quality": 192,
+ "sourceTimestamp": "2026-01-01T00:00:03Z",
+ "statuses": [
+ {
+ "success": 1,
+ "category": "MX_STATUS_CATEGORY_OK",
+ "detectedBy": "MX_STATUS_SOURCE_RESPONDING_LMX",
+ "detail": 0,
+ "rawCategory": 0,
+ "rawDetectedBy": 0,
+ "diagnosticText": "Buffered data delivered."
+ }
+ ],
+ "workerSequence": "4",
+ "workerTimestamp": "2026-01-01T00:00:03.010Z",
+ "gatewayReceiveTimestamp": "2026-01-01T00:00:03.015Z",
+ "onBufferedDataChange": {
+ "dataType": "MX_DATA_TYPE_FLOAT",
+ "qualityValues": {
+ "elementDataType": "MX_DATA_TYPE_INTEGER",
+ "variantType": "VT_ARRAY|VT_I4",
+ "dimensions": [
+ 2
+ ],
+ "int32Values": {
+ "values": [
+ 192,
+ 192
+ ]
+ }
+ },
+ "timestampValues": {
+ "elementDataType": "MX_DATA_TYPE_TIME",
+ "variantType": "VT_ARRAY|VT_DATE",
+ "dimensions": [
+ 2
+ ],
+ "timestampValues": {
+ "values": [
+ "2026-01-01T00:00:02Z",
+ "2026-01-01T00:00:03Z"
+ ]
+ }
+ },
+ "rawDataType": 5
+ }
+ }
+ ]
+}
diff --git a/clients/proto/fixtures/behavior/manifest.json b/clients/proto/fixtures/behavior/manifest.json
new file mode 100644
index 0000000..7585f94
--- /dev/null
+++ b/clients/proto/fixtures/behavior/manifest.json
@@ -0,0 +1,59 @@
+{
+ "schemaVersion": 1,
+ "fixtureSet": "mxaccess-gateway-client-behavior",
+ "contractName": "mxaccess-gateway",
+ "gatewayProtocolVersion": 1,
+ "workerProtocolVersion": 1,
+ "protoInputManifest": "clients/proto/proto-inputs.json",
+ "fixtures": [
+ {
+ "id": "command-reply.register.ok",
+ "category": "command_replies",
+ "messageType": "mxaccess_gateway.v1.MxCommandReply",
+ "path": "command-replies/register.ok.reply.json",
+ "expectation": "Successful command replies preserve protocol status, HRESULT, return value, status arrays, and method-specific output."
+ },
+ {
+ "id": "command-reply.write.mxaccess-failure",
+ "category": "command_replies",
+ "messageType": "mxaccess_gateway.v1.MxCommandReply",
+ "path": "command-replies/write.mxaccess-failure.reply.json",
+ "expectation": "MXAccess failures are data-bearing replies with HRESULT and status details, not transport failures."
+ },
+ {
+ "id": "event-stream.session-ordered",
+ "category": "event_streams",
+ "messageType": "mxaccess_gateway.v1.MxEvent",
+ "path": "event-streams/session-event-stream.json",
+ "expectation": "Clients preserve per-session event order and event family bodies exactly as emitted."
+ },
+ {
+ "id": "values.conversion-cases",
+ "category": "value_conversion",
+ "messageType": "mxaccess_gateway.v1.MxValue",
+ "path": "values/value-conversion-cases.json",
+ "expectation": "Clients expose typed projections and keep raw fallback metadata when conversion is incomplete."
+ },
+ {
+ "id": "statuses.conversion-cases",
+ "category": "status_conversion",
+ "messageType": "mxaccess_gateway.v1.MxStatusProxy",
+ "path": "statuses/status-conversion-cases.json",
+ "expectation": "Clients preserve every MXSTATUS_PROXY field, including raw category/source values."
+ },
+ {
+ "id": "auth.error-cases",
+ "category": "auth_errors",
+ "messageType": "client_behavior.v1.AuthErrorCase",
+ "path": "auth/auth-error-cases.json",
+ "expectation": "Clients map authentication and authorization failures distinctly and redact credentials."
+ },
+ {
+ "id": "timeout-cancel.expected-behavior",
+ "category": "timeout_cancel",
+ "messageType": "client_behavior.v1.TimeoutCancelCase",
+ "path": "timeout-cancel/timeout-cancel-cases.json",
+ "expectation": "Client cancellation stops waiting locally but does not imply an in-flight MXAccess COM call was aborted."
+ }
+ ]
+}
diff --git a/clients/proto/fixtures/behavior/statuses/status-conversion-cases.json b/clients/proto/fixtures/behavior/statuses/status-conversion-cases.json
new file mode 100644
index 0000000..4219463
--- /dev/null
+++ b/clients/proto/fixtures/behavior/statuses/status-conversion-cases.json
@@ -0,0 +1,41 @@
+{
+ "schemaVersion": 1,
+ "cases": [
+ {
+ "id": "ok.responding-lmx",
+ "status": {
+ "success": 1,
+ "category": "MX_STATUS_CATEGORY_OK",
+ "detectedBy": "MX_STATUS_SOURCE_RESPONDING_LMX",
+ "detail": 0,
+ "rawCategory": 0,
+ "rawDetectedBy": 0,
+ "diagnosticText": "OK"
+ }
+ },
+ {
+ "id": "security-error.requesting-lmx",
+ "status": {
+ "success": 0,
+ "category": "MX_STATUS_CATEGORY_SECURITY_ERROR",
+ "detectedBy": "MX_STATUS_SOURCE_REQUESTING_LMX",
+ "detail": 401,
+ "rawCategory": 8,
+ "rawDetectedBy": 2,
+ "diagnosticText": "Requesting LMX denied the secured operation."
+ }
+ },
+ {
+ "id": "raw-unknown-category",
+ "status": {
+ "success": 0,
+ "category": "MX_STATUS_CATEGORY_UNKNOWN",
+ "detectedBy": "MX_STATUS_SOURCE_UNKNOWN",
+ "detail": 65535,
+ "rawCategory": 99,
+ "rawDetectedBy": 77,
+ "diagnosticText": "Unknown native MXSTATUS_PROXY fields are preserved."
+ }
+ }
+ ]
+}
diff --git a/clients/proto/fixtures/behavior/timeout-cancel/timeout-cancel-cases.json b/clients/proto/fixtures/behavior/timeout-cancel/timeout-cancel-cases.json
new file mode 100644
index 0000000..5e816a1
--- /dev/null
+++ b/clients/proto/fixtures/behavior/timeout-cancel/timeout-cancel-cases.json
@@ -0,0 +1,27 @@
+{
+ "schemaVersion": 1,
+ "cases": [
+ {
+ "id": "unary-deadline-exceeded",
+ "operation": "Invoke",
+ "clientDeadline": "2s",
+ "grpcStatusCode": "DEADLINE_EXCEEDED",
+ "clientErrorCategory": "TimeoutError",
+ "gatewayWaitBehavior": "stops_waiting_for_reply",
+ "workerCommandBehavior": "continues_until_worker_reply_or_worker_fault",
+ "sessionExpectation": "session_state_is_unknown_until_follow_up_status_or_close",
+ "expectedClientAction": "issue GetSessionState or CloseSession before reusing handles"
+ },
+ {
+ "id": "stream-cancel",
+ "operation": "StreamEvents",
+ "clientDeadline": "5s",
+ "grpcStatusCode": "CANCELLED",
+ "clientErrorCategory": "CancelledError",
+ "gatewayWaitBehavior": "stops_streaming_to_that_call",
+ "workerCommandBehavior": "does_not_cancel_worker_session",
+ "sessionExpectation": "session_remains_ready_if_worker_stays_healthy",
+ "expectedClientAction": "open a new StreamEvents call with the last observed worker sequence"
+ }
+ ]
+}
diff --git a/clients/proto/fixtures/behavior/values/value-conversion-cases.json b/clients/proto/fixtures/behavior/values/value-conversion-cases.json
new file mode 100644
index 0000000..8fbabe2
--- /dev/null
+++ b/clients/proto/fixtures/behavior/values/value-conversion-cases.json
@@ -0,0 +1,85 @@
+{
+ "schemaVersion": 1,
+ "cases": [
+ {
+ "id": "bool.true",
+ "expectedKind": "boolValue",
+ "value": {
+ "dataType": "MX_DATA_TYPE_BOOLEAN",
+ "variantType": "VT_BOOL",
+ "boolValue": true
+ }
+ },
+ {
+ "id": "int64.large",
+ "expectedKind": "int64Value",
+ "value": {
+ "dataType": "MX_DATA_TYPE_INTEGER",
+ "variantType": "VT_I8",
+ "int64Value": "9223372036854770000"
+ }
+ },
+ {
+ "id": "timestamp.utc",
+ "expectedKind": "timestampValue",
+ "value": {
+ "dataType": "MX_DATA_TYPE_TIME",
+ "variantType": "VT_DATE",
+ "timestampValue": "2026-01-01T00:00:04Z"
+ }
+ },
+ {
+ "id": "string-array",
+ "expectedKind": "arrayValue",
+ "value": {
+ "dataType": "MX_DATA_TYPE_STRING",
+ "arrayValue": {
+ "elementDataType": "MX_DATA_TYPE_STRING",
+ "variantType": "VT_ARRAY|VT_BSTR",
+ "dimensions": [
+ 2
+ ],
+ "stringValues": {
+ "values": [
+ "alpha",
+ "beta"
+ ]
+ }
+ }
+ }
+ },
+ {
+ "id": "raw-fallback.variant",
+ "expectedKind": "rawValue",
+ "value": {
+ "dataType": "MX_DATA_TYPE_UNKNOWN",
+ "variantType": "VT_RECORD",
+ "rawDiagnostic": "No lossless typed projection exists for this VARIANT.",
+ "rawDataType": 32767,
+ "rawValue": "AQIDBAU="
+ }
+ },
+ {
+ "id": "raw-array-fallback",
+ "expectedKind": "arrayValue",
+ "value": {
+ "dataType": "MX_DATA_TYPE_UNKNOWN",
+ "arrayValue": {
+ "elementDataType": "MX_DATA_TYPE_UNKNOWN",
+ "variantType": "VT_ARRAY|VT_VARIANT",
+ "dimensions": [
+ 2
+ ],
+ "rawDiagnostic": "Array elements contain mixed VARIANT types.",
+ "rawElementDataType": 32767,
+ "rawValues": {
+ "values": [
+ "AAE=",
+ "AgM="
+ ]
+ }
+ }
+ }
+ }
+ ]
+}
diff --git a/clients/proto/proto-inputs.json b/clients/proto/proto-inputs.json
index 3d1f75e..0042f94 100644
--- a/clients/proto/proto-inputs.json
+++ b/clients/proto/proto-inputs.json
@@ -16,6 +16,7 @@
],
"descriptorSet": "clients/proto/descriptors/mxaccessgw-client-v1.protoset",
"fixtureRoot": "clients/proto/fixtures/golden",
+ "behaviorFixtureRoot": "clients/proto/fixtures/behavior",
"generatedOutputs": {
"dotnet": "clients/dotnet/generated",
"go": "clients/go/internal/generated",
diff --git a/docs/ClientBehaviorFixtures.md b/docs/ClientBehaviorFixtures.md
new file mode 100644
index 0000000..e3765e4
--- /dev/null
+++ b/docs/ClientBehaviorFixtures.md
@@ -0,0 +1,106 @@
+# Client Behavior Fixtures
+
+Client behavior fixtures define the shared expectations used by the official
+.NET, Go, Rust, Python, and Java clients. They keep wrapper behavior aligned
+while each language exposes idiomatic APIs over the same protobuf contract.
+
+## Fixture Set
+
+The fixture manifest is `clients/proto/fixtures/behavior/manifest.json`.
+`clients/proto/proto-inputs.json` references the fixture root through
+`behaviorFixtureRoot` so generators and client test projects can discover the
+same files they use for descriptor inputs.
+
+The fixture set contains:
+
+- command reply protobuf JSON,
+- ordered event stream protobuf JSON samples,
+- `MxValue` conversion case sets,
+- `MxStatusProxy` conversion case sets,
+- authentication and authorization error expectations,
+- timeout and cancellation behavior expectations.
+
+Protobuf message fixtures use protobuf JSON field names and enum values. Files
+that describe client wrapper behavior use explicit JSON fields instead of a
+proto message because those expectations apply above the generated transport
+types.
+
+## Command Replies
+
+Command reply fixtures live in
+`clients/proto/fixtures/behavior/command-replies/`. They parse as
+`mxaccess_gateway.v1.MxCommandReply`.
+
+Clients use these fixtures to verify that successful and failed MXAccess
+commands both carry the full reply details:
+
+- `protocolStatus`,
+- `hresult`,
+- `returnValue`,
+- repeated `statuses`,
+- method-specific reply payloads when MXAccess returns out parameters.
+
+MXAccess failures remain command replies when the gateway reached the worker and
+the worker captured HRESULT or `MXSTATUS_PROXY` details. Client wrappers should
+map those replies to rich command errors without discarding the raw reply.
+
+## Event Streams
+
+Event stream fixtures live in
+`clients/proto/fixtures/behavior/event-streams/`. Each file contains an ordered
+`events` array whose entries parse as `mxaccess_gateway.v1.MxEvent`.
+
+Clients use these fixtures to verify that stream helpers preserve
+`workerSequence` order and expose each native event family:
+
+- `OnDataChange`,
+- `OnWriteComplete`,
+- `OperationComplete`,
+- `OnBufferedDataChange`.
+
+Wrappers must not reorder, coalesce, or drop events while reading the fixture.
+
+## Value And Status Conversion
+
+Value fixtures live in `clients/proto/fixtures/behavior/values/`. Each case
+contains a `value` object that parses as `mxaccess_gateway.v1.MxValue`.
+
+Status fixtures live in `clients/proto/fixtures/behavior/statuses/`. Each case
+contains a `status` object that parses as
+`mxaccess_gateway.v1.MxStatusProxy`.
+
+Clients use these fixtures to verify typed projections and raw fallback
+behavior. A language helper may expose native booleans, integers, strings,
+arrays, and timestamps, but it must keep `rawDiagnostic`, raw data type fields,
+and raw byte payloads accessible when conversion is incomplete.
+
+## Auth, Timeout, And Cancel Behavior
+
+Authentication fixtures live in `clients/proto/fixtures/behavior/auth/`. They
+separate `UNAUTHENTICATED` from `PERMISSION_DENIED` so clients map missing or
+invalid credentials differently from missing scopes. Expected output strings
+contain only redacted credentials.
+
+Timeout and cancellation fixtures live in
+`clients/proto/fixtures/behavior/timeout-cancel/`. They document that canceling
+or timing out a client call stops the client from waiting, but it does not abort
+an in-flight MXAccess COM call on the worker STA. Clients should follow up with
+`GetSessionState` or `CloseSession` before reusing handles after an uncertain
+command timeout.
+
+## Validation
+
+Run the fixture validation tests after changing the behavior fixture set:
+
+```bash
+powershell -ExecutionPolicy Bypass -File scripts/validate-client-behavior-fixtures.ps1
+```
+
+The script runs the focused C# contract tests that parse all protobuf JSON
+fixtures and validate deterministic wrapper expectation files.
+
+## Related Documentation
+
+- [Client Proto Generation](./client-proto-generation.md)
+- [Client Libraries Detailed Design](./client-libraries-design.md)
+- [Protobuf Contracts](./Contracts.md)
diff --git a/docs/GatewayTesting.md b/docs/GatewayTesting.md
index 6412a7d..040707a 100644
--- a/docs/GatewayTesting.md
+++ b/docs/GatewayTesting.md
@@ -18,6 +18,7 @@ starting `MxGateway.Worker.exe` or loading MXAccess COM. The harness scripts:
- `WorkerHello` and `WorkerReady` startup,
- command replies with matching correlation ids,
- ordered `WorkerEvent` frames,
+- `WorkerHeartbeat` frames,
- `WorkerFault` frames,
- shutdown acknowledgements,
- malformed protobuf payloads and oversized frame headers,
@@ -43,6 +44,8 @@ event streaming behavior:
dotnet test src/MxGateway.Tests/MxGateway.Tests.csproj --filter FullyQualifiedName~FakeWorkerHarnessTests
dotnet test src/MxGateway.Tests/MxGateway.Tests.csproj --filter FullyQualifiedName~SessionWorkerClientFactoryFakeWorkerTests
dotnet test src/MxGateway.Tests/MxGateway.Tests.csproj --filter FullyQualifiedName~GatewayEndToEndFakeWorkerSmokeTests
+dotnet test src/MxGateway.Tests/MxGateway.Tests.csproj --filter FullyQualifiedName~WorkerClientTests
+dotnet test src/MxGateway.Worker.Tests/MxGateway.Worker.Tests.csproj -p:Platform=x86 --filter FullyQualifiedName~WorkerPipeSessionTests
```
Run the gateway test project after shared gateway test infrastructure changes:
diff --git a/docs/client-libraries-design.md b/docs/client-libraries-design.md
index b2cf188..f2e2054 100644
--- a/docs/client-libraries-design.md
+++ b/docs/client-libraries-design.md
@@ -29,6 +29,7 @@ Language-specific plans:
Shared generation inputs:
- `docs/client-proto-generation.md`
+- `docs/ClientBehaviorFixtures.md`
- `clients/proto/proto-inputs.json`
Language style guides:
@@ -310,6 +311,11 @@ CLI output should support JSON for automated tests.
Unit tests must run without a live gateway. Use fake gRPC services, mock
transports, or generated test servers depending on language.
+Shared behavior fixtures live in `clients/proto/fixtures/behavior`. Every
+client should include tests that load the fixture manifest and verify wrapper
+behavior against the common command reply, event stream, value conversion,
+status conversion, auth error, and timeout/cancel cases.
+
Required unit test areas:
- options parsing,
diff --git a/docs/client-proto-generation.md b/docs/client-proto-generation.md
index 88f8a92..c9276c4 100644
--- a/docs/client-proto-generation.md
+++ b/docs/client-proto-generation.md
@@ -16,6 +16,7 @@ records:
- the public and worker source files,
- the descriptor set path,
- golden fixture locations,
+- behavior fixture locations,
- generated-code output directories for each planned client.
The source files listed by the manifest are:
@@ -99,6 +100,17 @@ Go clients should generate `mxaccess_gateway.proto` and
`protoc-gen-go` and `protoc-gen-go-grpc`. Keep generated packages internal
unless the wrapper API intentionally exposes raw protobuf messages.
+The Go scaffold provides a repo-local generation script:
+
+```powershell
+clients/go/generate-proto.ps1
+```
+
+The script maps both proto files into the internal Go package
+`gitea.dohertylan.com/dohertj2/mxaccessgw/clients/go/internal/generated` because
+the source `.proto` files do not carry Go-specific `go_package` options. This
+keeps language-specific packaging outside the public contract files.
+
Rust clients should use `tonic-build` or the selected protobuf generator from
the Rust client build script, with generated modules placed under
`clients/rust/src/generated` or included from the build output according to the
@@ -125,9 +137,30 @@ The fixtures use protobuf JSON field names and enum values. Contract tests parse
them with the generated C# types so schema drift is caught before client
generation work starts.
+## Behavior Fixtures
+
+Cross-language behavior fixtures live in
+`clients/proto/fixtures/behavior`. The manifest
+`clients/proto/fixtures/behavior/manifest.json` lists command replies, ordered
+event stream samples, value conversion cases, status conversion cases, auth
+error expectations, and timeout/cancel expectations.
+
+The behavior fixtures let each generated client wrapper test the same
+expectations without a live gateway. Protobuf message fixtures parse with the
+generated types. Auth and timeout/cancel files describe wrapper behavior above
+the generated transport layer, including credential redaction and the rule that
+client cancellation does not abort an in-flight MXAccess COM call.
+
+Run the focused validation script after changing these fixtures:
+
+```powershell
+scripts/validate-client-behavior-fixtures.ps1
+```
+
## Related Documentation
- [Protobuf Contracts](./Contracts.md)
- [Client Libraries Detailed Design](./client-libraries-design.md)
+- [Client Behavior Fixtures](./ClientBehaviorFixtures.md)
- [Client Libraries Implementation Plan](./implementation-plan-clients.md)
- [Protobuf Style Guide](./style-guides/ProtobufStyleGuide.md)
diff --git a/docs/clients-dotnet-csharp-design.md b/docs/clients-dotnet-csharp-design.md
index 900b63c..8b35036 100644
--- a/docs/clients-dotnet-csharp-design.md
+++ b/docs/clients-dotnet-csharp-design.md
@@ -16,6 +16,7 @@ Recommended layout:
```text
clients/dotnet/
+ MxGateway.Client.sln
MxGateway.Client/
MxGateway.Client.csproj
GatewayClient.cs
@@ -41,6 +42,12 @@ Target framework:
net10.0
```
+The scaffold uses a project reference to
+`src/MxGateway.Contracts/MxGateway.Contracts.csproj` for generated protobuf and
+gRPC types. `clients/dotnet/generated` remains reserved for client-local
+generator output if the .NET client later needs to decouple from the contracts
+project.
+
Expected packages:
- `Grpc.Net.Client`
diff --git a/docs/mxaccess-worker-instance-design.md b/docs/mxaccess-worker-instance-design.md
index 09e92d4..f0343b6 100644
--- a/docs/mxaccess-worker-instance-design.md
+++ b/docs/mxaccess-worker-instance-design.md
@@ -625,13 +625,19 @@ Do not drop or coalesce events in v1.
## Heartbeat And Watchdog
-The worker heartbeat should prove that:
+`WorkerPipeSession` starts the heartbeat loop after the gateway validates
+`WorkerHello` and receives `WorkerReady`. Heartbeats continue until
+`WorkerShutdown`, cancellation, or a pipe/protocol failure stops the session.
+The loop uses `WorkerPipeSessionOptions.HeartbeatInterval`; the default matches
+the gateway worker heartbeat interval.
+
+The worker heartbeat proves that:
- pipe writer is alive,
- worker host is alive,
- STA has recently pumped or completed work.
-Heartbeat payload should include:
+Heartbeat payload includes:
- worker process id,
- session id,
@@ -642,13 +648,19 @@ Heartbeat payload should include:
- event sequence,
- current command correlation id if any.
-The STA watchdog should warn when:
+`MxAccessStaSession.CaptureHeartbeat()` reads `StaRuntime.LastActivityUtc` and
+`StaCommandDispatcher` queue state without touching the raw MXAccess COM object
+outside the STA. Event queue depth and event sequence are reported as zero until
+the event queue implementation owns those counters.
-- one command exceeds its expected duration,
-- the STA has not pumped messages within the heartbeat grace period,
-- event queue depth remains high.
-
-The worker can report the problem, but the gateway owns the final kill decision.
+The STA watchdog currently emits a `WorkerFault` with
+`WorkerFaultCategory.StaHung` when `LastStaActivityUtc` is older than
+`WorkerPipeSessionOptions.HeartbeatGrace`. The fault includes the current
+command correlation id when a command is active. Command duration and high event
+queue depth remain observable through heartbeat fields until dedicated
+thresholds own those warnings. The worker reports stale STA activity, but the
+gateway owns the final kill decision through its existing heartbeat and worker
+lifecycle policy.
## Shutdown
diff --git a/scripts/validate-client-behavior-fixtures.ps1 b/scripts/validate-client-behavior-fixtures.ps1
new file mode 100644
index 0000000..6f1ea3b
--- /dev/null
+++ b/scripts/validate-client-behavior-fixtures.ps1
@@ -0,0 +1,26 @@
+[CmdletBinding()]
+param(
+ [switch]$NoBuild
+)
+
+Set-StrictMode -Version Latest
+$ErrorActionPreference = "Stop"
+
+$repoRoot = Resolve-Path (Join-Path $PSScriptRoot "..")
+$testProject = Join-Path $repoRoot "src/MxGateway.Tests/MxGateway.Tests.csproj"
+$arguments = @(
+ "test",
+ $testProject,
+ "--filter",
+ "ClientBehaviorFixtureTests"
+)
+
+if ($NoBuild) {
+ $arguments += "--no-build"
+}
+
+& dotnet @arguments
+
+if ($LASTEXITCODE -ne 0) {
+ throw "Client behavior fixture validation failed with exit code $LASTEXITCODE."
+}
diff --git a/src/MxGateway.Tests/Contracts/ClientBehaviorFixtureTests.cs b/src/MxGateway.Tests/Contracts/ClientBehaviorFixtureTests.cs
new file mode 100644
index 0000000..d48979e
--- /dev/null
+++ b/src/MxGateway.Tests/Contracts/ClientBehaviorFixtureTests.cs
@@ -0,0 +1,379 @@
+using System.Text.Json;
+using Google.Protobuf;
+using MxGateway.Contracts;
+using MxGateway.Contracts.Proto;
+
+namespace MxGateway.Tests.Contracts;
+
+public sealed class ClientBehaviorFixtureTests
+{
+ private static readonly JsonParser ProtobufJsonParser = new(JsonParser.Settings.Default);
+
+ [Fact]
+ public void BehaviorManifest_DeclaresCurrentProtocolVersionsAndExistingFixtures()
+ {
+ using JsonDocument manifest = LoadBehaviorManifest();
+ JsonElement root = manifest.RootElement;
+
+ Assert.Equal(1, root.GetProperty("schemaVersion").GetInt32());
+ Assert.Equal("mxaccess-gateway-client-behavior", root.GetProperty("fixtureSet").GetString());
+ Assert.Equal(GatewayContractInfo.GatewayProtocolVersion, root.GetProperty("gatewayProtocolVersion").GetUInt32());
+ Assert.Equal(GatewayContractInfo.WorkerProtocolVersion, root.GetProperty("workerProtocolVersion").GetUInt32());
+
+ HashSet fixtureIds = new(StringComparer.Ordinal);
+ foreach (JsonElement fixture in root.GetProperty("fixtures").EnumerateArray())
+ {
+ string id = fixture.GetProperty("id").GetString()!;
+ string path = fixture.GetProperty("path").GetString()!;
+ string category = fixture.GetProperty("category").GetString()!;
+ string messageType = fixture.GetProperty("messageType").GetString()!;
+
+ Assert.True(fixtureIds.Add(id), $"Duplicate behavior fixture id '{id}'.");
+ Assert.Contains(category, KnownCategories);
+ Assert.Contains(messageType, KnownMessageTypes);
+ Assert.True(
+ File.Exists(Path.Combine(GetBehaviorFixtureRoot().FullName, path)),
+ $"Expected behavior fixture '{path}' to exist.");
+ Assert.False(Path.IsPathRooted(path), $"Fixture path '{path}' must be relative.");
+ Assert.NotEmpty(fixture.GetProperty("expectation").GetString()!);
+ }
+ }
+
+ [Fact]
+ public void ProtoInputManifest_ReferencesBehaviorFixtureRoot()
+ {
+ DirectoryInfo repositoryRoot = FindRepositoryRoot();
+ string manifestPath = Path.Combine(repositoryRoot.FullName, "clients", "proto", "proto-inputs.json");
+
+ using JsonDocument manifest = JsonDocument.Parse(File.ReadAllText(manifestPath));
+ string fixtureRoot = manifest.RootElement.GetProperty("behaviorFixtureRoot").GetString()!;
+
+ Assert.Equal("clients/proto/fixtures/behavior", fixtureRoot);
+ Assert.True(Directory.Exists(Path.Combine(repositoryRoot.FullName, fixtureRoot)));
+ }
+
+ [Fact]
+ public void CommandReplyFixtures_ParseWithCurrentContractAndPreserveMxAccessDetails()
+ {
+ IReadOnlyList fixtures = LoadManifestFixtures("command_replies");
+ Assert.NotEmpty(fixtures);
+
+ foreach (JsonElement fixture in fixtures)
+ {
+ MxCommandReply reply = ParseFixture(
+ fixture,
+ MxCommandReply.Parser);
+
+ Assert.NotEqual(MxCommandKind.Unspecified, reply.Kind);
+ Assert.NotEqual(ProtocolStatusCode.Unspecified, reply.ProtocolStatus.Code);
+ Assert.True(reply.HasHresult, $"Fixture '{GetFixtureId(fixture)}' must carry an HRESULT.");
+ Assert.NotEmpty(reply.Statuses);
+ Assert.NotEqual(MxDataType.Unspecified, reply.ReturnValue.DataType);
+ Assert.True(
+ reply.ReturnValue.KindCase != MxValue.KindOneofCase.None || reply.ReturnValue.IsNull,
+ $"Fixture '{GetFixtureId(fixture)}' must carry a typed value, raw value, or explicit null.");
+ }
+
+ MxCommandReply failedWrite = ParseFixture(
+ Assert.Single(fixtures, fixture => GetFixtureId(fixture) == "command-reply.write.mxaccess-failure"),
+ MxCommandReply.Parser);
+
+ Assert.Equal(ProtocolStatusCode.MxaccessFailure, failedWrite.ProtocolStatus.Code);
+ Assert.Equal(-2147220992, failedWrite.Hresult);
+ Assert.True(failedWrite.Statuses.Count > 1);
+ Assert.All(failedWrite.Statuses, status => Assert.Equal(0, status.Success));
+ }
+
+ [Fact]
+ public void EventStreamFixtures_ParseWithMonotonicSequencesAndExpectedFamilies()
+ {
+ IReadOnlyList fixtures = LoadManifestFixtures("event_streams");
+ Assert.NotEmpty(fixtures);
+
+ foreach (JsonElement fixture in fixtures)
+ {
+ using JsonDocument document = JsonDocument.Parse(File.ReadAllText(GetFixturePath(fixture)));
+ ulong previousSequence = 0;
+ List families = [];
+
+ foreach (JsonElement eventElement in document.RootElement.GetProperty("events").EnumerateArray())
+ {
+ MxEvent gatewayEvent = ProtobufJsonParser.Parse(eventElement.GetRawText());
+
+ Assert.True(gatewayEvent.WorkerSequence > previousSequence);
+ Assert.Equal(document.RootElement.GetProperty("sessionId").GetString(), gatewayEvent.SessionId);
+ Assert.NotEmpty(gatewayEvent.Statuses);
+ AssertEventBodyMatchesFamily(gatewayEvent);
+
+ previousSequence = gatewayEvent.WorkerSequence;
+ families.Add(gatewayEvent.Family);
+ }
+
+ Assert.Contains(MxEventFamily.OnDataChange, families);
+ Assert.Contains(MxEventFamily.OnWriteComplete, families);
+ Assert.Contains(MxEventFamily.OperationComplete, families);
+ Assert.Contains(MxEventFamily.OnBufferedDataChange, families);
+ }
+ }
+
+ [Fact]
+ public void ValueConversionFixtures_ParseTypedValuesAndRawFallbacks()
+ {
+ JsonElement cases = LoadCaseSet("value_conversion", "cases");
+ bool sawRawFallback = false;
+ bool sawRawArrayFallback = false;
+ bool sawTypedArray = false;
+
+ foreach (JsonElement valueCase in cases.EnumerateArray())
+ {
+ MxValue value = ProtobufJsonParser.Parse(
+ valueCase.GetProperty("value").GetRawText());
+ string expectedKind = valueCase.GetProperty("expectedKind").GetString()!;
+
+ Assert.NotEqual(MxDataType.Unspecified, value.DataType);
+ AssertJsonKindMatchesValueKind(expectedKind, value);
+
+ sawRawFallback |= value.KindCase == MxValue.KindOneofCase.RawValue
+ && !string.IsNullOrWhiteSpace(value.RawDiagnostic)
+ && value.RawDataType != 0;
+ sawRawArrayFallback |= value.KindCase == MxValue.KindOneofCase.ArrayValue
+ && value.ArrayValue.ValuesCase == MxArray.ValuesOneofCase.RawValues
+ && !string.IsNullOrWhiteSpace(value.ArrayValue.RawDiagnostic)
+ && value.ArrayValue.RawElementDataType != 0;
+ sawTypedArray |= value.KindCase == MxValue.KindOneofCase.ArrayValue
+ && value.ArrayValue.ValuesCase != MxArray.ValuesOneofCase.RawValues;
+ }
+
+ Assert.True(sawRawFallback, "Expected at least one raw scalar fallback case.");
+ Assert.True(sawRawArrayFallback, "Expected at least one raw array fallback case.");
+ Assert.True(sawTypedArray, "Expected at least one typed array case.");
+ }
+
+ [Fact]
+ public void StatusConversionFixtures_ParseStatusArraysAndRawFields()
+ {
+ JsonElement cases = LoadCaseSet("status_conversion", "cases");
+ bool sawRawUnknown = false;
+
+ foreach (JsonElement statusCase in cases.EnumerateArray())
+ {
+ MxStatusProxy status = ProtobufJsonParser.Parse(
+ statusCase.GetProperty("status").GetRawText());
+
+ Assert.NotEqual(MxStatusCategory.Unspecified, status.Category);
+ Assert.NotEqual(MxStatusSource.Unspecified, status.DetectedBy);
+ Assert.NotEmpty(status.DiagnosticText);
+
+ sawRawUnknown |= status.Category == MxStatusCategory.Unknown
+ && status.RawCategory != 0
+ && status.RawDetectedBy != 0;
+ }
+
+ Assert.True(sawRawUnknown, "Expected a status case with unknown raw native fields.");
+ }
+
+ [Fact]
+ public void AuthErrorFixtures_MapAuthenticationAuthorizationAndRedactCredentials()
+ {
+ JsonElement cases = LoadCaseSet("auth_errors", "cases");
+ HashSet statusCodes = new(StringComparer.Ordinal);
+
+ foreach (JsonElement authCase in cases.EnumerateArray())
+ {
+ string grpcStatusCode = authCase.GetProperty("grpcStatusCode").GetString()!;
+ string category = authCase.GetProperty("clientErrorCategory").GetString()!;
+ string redactedOutput = authCase.GetProperty("expectedRedactedOutput").GetString()!;
+ string serialized = authCase.GetRawText();
+
+ Assert.Contains(grpcStatusCode, AuthGrpcStatusCodes);
+ Assert.Contains(category, AuthClientErrorCategories);
+ string authorization = authCase.GetProperty("inputMetadata").GetProperty("authorization").GetString()!;
+ if (!string.IsNullOrEmpty(authorization))
+ {
+ Assert.Contains("", serialized);
+ }
+
+ Assert.DoesNotContain("mxgw_", serialized, StringComparison.Ordinal);
+ Assert.DoesNotContain("secret", redactedOutput, StringComparison.OrdinalIgnoreCase);
+
+ statusCodes.Add(grpcStatusCode);
+ }
+
+ Assert.Contains("UNAUTHENTICATED", statusCodes);
+ Assert.Contains("PERMISSION_DENIED", statusCodes);
+ }
+
+ [Fact]
+ public void TimeoutCancelFixtures_DocumentClientWaitAndWorkerCommandBehavior()
+ {
+ JsonElement cases = LoadCaseSet("timeout_cancel", "cases");
+ HashSet statusCodes = new(StringComparer.Ordinal);
+
+ foreach (JsonElement timeoutCase in cases.EnumerateArray())
+ {
+ string grpcStatusCode = timeoutCase.GetProperty("grpcStatusCode").GetString()!;
+
+ Assert.Contains(grpcStatusCode, TimeoutGrpcStatusCodes);
+ Assert.NotEmpty(timeoutCase.GetProperty("clientDeadline").GetString()!);
+ Assert.NotEmpty(timeoutCase.GetProperty("gatewayWaitBehavior").GetString()!);
+ Assert.NotEmpty(timeoutCase.GetProperty("workerCommandBehavior").GetString()!);
+ Assert.NotEmpty(timeoutCase.GetProperty("expectedClientAction").GetString()!);
+
+ statusCodes.Add(grpcStatusCode);
+ }
+
+ Assert.Contains("DEADLINE_EXCEEDED", statusCodes);
+ Assert.Contains("CANCELLED", statusCodes);
+ }
+
+ private static readonly string[] KnownCategories =
+ [
+ "command_replies",
+ "event_streams",
+ "value_conversion",
+ "status_conversion",
+ "auth_errors",
+ "timeout_cancel",
+ ];
+
+ private static readonly string[] KnownMessageTypes =
+ [
+ "mxaccess_gateway.v1.MxCommandReply",
+ "mxaccess_gateway.v1.MxEvent",
+ "mxaccess_gateway.v1.MxValue",
+ "mxaccess_gateway.v1.MxStatusProxy",
+ "client_behavior.v1.AuthErrorCase",
+ "client_behavior.v1.TimeoutCancelCase",
+ ];
+
+ private static readonly string[] AuthGrpcStatusCodes =
+ [
+ "UNAUTHENTICATED",
+ "PERMISSION_DENIED",
+ ];
+
+ private static readonly string[] AuthClientErrorCategories =
+ [
+ "AuthenticationError",
+ "AuthorizationError",
+ ];
+
+ private static readonly string[] TimeoutGrpcStatusCodes =
+ [
+ "DEADLINE_EXCEEDED",
+ "CANCELLED",
+ ];
+
+ private static T ParseFixture(
+ JsonElement fixture,
+ MessageParser parser)
+ where T : IMessage
+ {
+ return parser.ParseJson(File.ReadAllText(GetFixturePath(fixture)));
+ }
+
+ private static JsonElement LoadCaseSet(
+ string category,
+ string propertyName)
+ {
+ JsonElement fixture = Assert.Single(LoadManifestFixtures(category));
+ using JsonDocument document = JsonDocument.Parse(File.ReadAllText(GetFixturePath(fixture)));
+
+ return document.RootElement.GetProperty(propertyName).Clone();
+ }
+
+ private static IReadOnlyList LoadManifestFixtures(string category)
+ {
+ using JsonDocument manifest = LoadBehaviorManifest();
+
+ return manifest.RootElement
+ .GetProperty("fixtures")
+ .EnumerateArray()
+ .Where(fixture => fixture.GetProperty("category").GetString() == category)
+ .Select(fixture => fixture.Clone())
+ .ToArray();
+ }
+
+ private static JsonDocument LoadBehaviorManifest()
+ {
+ return JsonDocument.Parse(File.ReadAllText(Path.Combine(GetBehaviorFixtureRoot().FullName, "manifest.json")));
+ }
+
+ private static string GetFixturePath(JsonElement fixture)
+ {
+ return Path.Combine(GetBehaviorFixtureRoot().FullName, fixture.GetProperty("path").GetString()!);
+ }
+
+ private static string GetFixtureId(JsonElement fixture)
+ {
+ return fixture.GetProperty("id").GetString()!;
+ }
+
+ private static DirectoryInfo GetBehaviorFixtureRoot()
+ {
+ DirectoryInfo repositoryRoot = FindRepositoryRoot();
+
+ return new DirectoryInfo(Path.Combine(repositoryRoot.FullName, "clients", "proto", "fixtures", "behavior"));
+ }
+
+ private static DirectoryInfo FindRepositoryRoot()
+ {
+ DirectoryInfo? current = new(AppContext.BaseDirectory);
+
+ while (current is not null)
+ {
+ if (File.Exists(Path.Combine(current.FullName, "AGENTS.md"))
+ && Directory.Exists(Path.Combine(current.FullName, "src"))
+ && Directory.Exists(Path.Combine(current.FullName, "clients")))
+ {
+ return current;
+ }
+
+ current = current.Parent;
+ }
+
+ throw new DirectoryNotFoundException("Could not locate the repository root from the test output directory.");
+ }
+
+ private static void AssertEventBodyMatchesFamily(MxEvent gatewayEvent)
+ {
+ switch (gatewayEvent.Family)
+ {
+ case MxEventFamily.OnDataChange:
+ Assert.Equal(MxEvent.BodyOneofCase.OnDataChange, gatewayEvent.BodyCase);
+ break;
+ case MxEventFamily.OnWriteComplete:
+ Assert.Equal(MxEvent.BodyOneofCase.OnWriteComplete, gatewayEvent.BodyCase);
+ break;
+ case MxEventFamily.OperationComplete:
+ Assert.Equal(MxEvent.BodyOneofCase.OperationComplete, gatewayEvent.BodyCase);
+ break;
+ case MxEventFamily.OnBufferedDataChange:
+ Assert.Equal(MxEvent.BodyOneofCase.OnBufferedDataChange, gatewayEvent.BodyCase);
+ break;
+ default:
+ throw new InvalidOperationException($"Unexpected event family '{gatewayEvent.Family}'.");
+ }
+ }
+
+ private static void AssertJsonKindMatchesValueKind(
+ string expectedKind,
+ MxValue value)
+ {
+ MxValue.KindOneofCase expected = expectedKind switch
+ {
+ "boolValue" => MxValue.KindOneofCase.BoolValue,
+ "int32Value" => MxValue.KindOneofCase.Int32Value,
+ "int64Value" => MxValue.KindOneofCase.Int64Value,
+ "floatValue" => MxValue.KindOneofCase.FloatValue,
+ "doubleValue" => MxValue.KindOneofCase.DoubleValue,
+ "stringValue" => MxValue.KindOneofCase.StringValue,
+ "timestampValue" => MxValue.KindOneofCase.TimestampValue,
+ "arrayValue" => MxValue.KindOneofCase.ArrayValue,
+ "rawValue" => MxValue.KindOneofCase.RawValue,
+ _ => throw new InvalidOperationException($"Unexpected expected value kind '{expectedKind}'."),
+ };
+
+ Assert.Equal(expected, value.KindCase);
+ }
+}
diff --git a/src/MxGateway.Tests/Gateway/Workers/FakeWorkerHarnessTests.cs b/src/MxGateway.Tests/Gateway/Workers/FakeWorkerHarnessTests.cs
index b5daed4..c9daa54 100644
--- a/src/MxGateway.Tests/Gateway/Workers/FakeWorkerHarnessTests.cs
+++ b/src/MxGateway.Tests/Gateway/Workers/FakeWorkerHarnessTests.cs
@@ -105,6 +105,25 @@ public sealed class FakeWorkerHarnessTests
Assert.Equal(WorkerClientState.Faulted, client.State);
}
+ [Fact]
+ public async Task SendHeartbeatAsync_UpdatesClientHeartbeatState()
+ {
+ await using FakeWorkerHarness fakeWorker = await FakeWorkerHarness.CreateConnectedPairAsync();
+ await using WorkerClient client = fakeWorker.CreateClient();
+ await StartClientAsync(fakeWorker, client);
+ DateTimeOffset previousHeartbeat = client.LastHeartbeatAt;
+
+ await Task.Delay(TimeSpan.FromMilliseconds(20));
+ await fakeWorker.SendHeartbeatAsync(
+ configureHeartbeat: heartbeat => heartbeat.WorkerProcessId = 2468);
+
+ await WaitUntilAsync(
+ () => client.ProcessId == 2468 && client.LastHeartbeatAt > previousHeartbeat,
+ TestTimeout);
+
+ Assert.Equal(WorkerClientState.Ready, client.State);
+ }
+
[Fact]
public async Task InvokeAsync_WithHungWorker_TimesOutPendingCommand()
{
diff --git a/src/MxGateway.Tests/Gateway/Workers/Fakes/FakeWorkerHarness.cs b/src/MxGateway.Tests/Gateway/Workers/Fakes/FakeWorkerHarness.cs
index 5981618..c9e5883 100644
--- a/src/MxGateway.Tests/Gateway/Workers/Fakes/FakeWorkerHarness.cs
+++ b/src/MxGateway.Tests/Gateway/Workers/Fakes/FakeWorkerHarness.cs
@@ -284,6 +284,26 @@ public sealed class FakeWorkerHarness : IAsyncDisposable
cancellationToken).ConfigureAwait(false);
}
+ public async Task SendHeartbeatAsync(
+ WorkerState state = WorkerState.Ready,
+ CancellationToken cancellationToken = default,
+ Action? configureHeartbeat = null)
+ {
+ WorkerHeartbeat heartbeat = new()
+ {
+ WorkerProcessId = DefaultWorkerProcessId,
+ State = state,
+ LastStaActivityTimestamp = Timestamp.FromDateTimeOffset(DateTimeOffset.UtcNow),
+ };
+ configureHeartbeat?.Invoke(heartbeat);
+
+ await _writer.WriteAsync(
+ CreateEnvelope(
+ correlationId: string.Empty,
+ envelope => envelope.WorkerHeartbeat = heartbeat),
+ cancellationToken).ConfigureAwait(false);
+ }
+
public async Task SendShutdownAckAsync(
ProtocolStatusCode statusCode = ProtocolStatusCode.Ok,
CancellationToken cancellationToken = default)
diff --git a/src/MxGateway.Tests/Gateway/Workers/WorkerClientTests.cs b/src/MxGateway.Tests/Gateway/Workers/WorkerClientTests.cs
index cf55511..1d8e03b 100644
--- a/src/MxGateway.Tests/Gateway/Workers/WorkerClientTests.cs
+++ b/src/MxGateway.Tests/Gateway/Workers/WorkerClientTests.cs
@@ -1,4 +1,5 @@
using System.IO.Pipes;
+using Google.Protobuf.WellKnownTypes;
using MxGateway.Contracts;
using MxGateway.Contracts.Proto;
using MxGateway.Server.Workers;
@@ -151,6 +152,24 @@ public sealed class WorkerClientTests
Assert.Equal(WorkerClientState.Faulted, client.State);
}
+ [Fact]
+ public async Task ReadLoop_WhenHeartbeatArrives_UpdatesLastHeartbeatAndWorkerProcess()
+ {
+ await using PipePair pipePair = await PipePair.CreateAsync();
+ await using WorkerClient client = CreateClient(pipePair);
+ await CompleteHandshakeAsync(client, pipePair);
+ DateTimeOffset previousHeartbeat = client.LastHeartbeatAt;
+
+ await Task.Delay(TimeSpan.FromMilliseconds(20));
+ await pipePair.WorkerWriter.WriteAsync(CreateHeartbeatEnvelope(workerProcessId: 9876));
+
+ await WaitUntilAsync(
+ () => client.ProcessId == 9876 && client.LastHeartbeatAt > previousHeartbeat,
+ TestTimeout);
+
+ Assert.Equal(WorkerClientState.Ready, client.State);
+ }
+
[Fact]
public async Task HeartbeatMonitor_WhenHeartbeatExpires_FaultsClient()
{
@@ -276,6 +295,21 @@ public sealed class WorkerClientTests
});
}
+ private static WorkerEnvelope CreateHeartbeatEnvelope(int workerProcessId)
+ {
+ return CreateWorkerEnvelope(
+ correlationId: string.Empty,
+ sequence: 20,
+ envelope => envelope.WorkerHeartbeat = new WorkerHeartbeat
+ {
+ WorkerProcessId = workerProcessId,
+ State = WorkerState.Ready,
+ LastStaActivityTimestamp = Timestamp.FromDateTimeOffset(DateTimeOffset.UtcNow),
+ PendingCommandCount = 0,
+ OutboundEventQueueDepth = 0,
+ });
+ }
+
private static WorkerEnvelope CreateWorkerEnvelope(
string correlationId,
ulong sequence,
diff --git a/src/MxGateway.Worker.Tests/Bootstrap/WorkerApplicationTests.cs b/src/MxGateway.Worker.Tests/Bootstrap/WorkerApplicationTests.cs
index a142266..cfda899 100644
--- a/src/MxGateway.Worker.Tests/Bootstrap/WorkerApplicationTests.cs
+++ b/src/MxGateway.Worker.Tests/Bootstrap/WorkerApplicationTests.cs
@@ -30,7 +30,7 @@ public sealed class WorkerApplicationTests
Assert.Equal("mxaccess-gateway-123-session-1", entry.Fields["pipe_name"]);
Assert.Equal(GatewayContractInfo.WorkerProtocolVersion, entry.Fields["protocol_version"]);
Assert.Equal("[redacted]", entry.Fields["nonce"]);
- Assert.Equal("WorkerPipeHandshakeSucceeded", logger.Entries[1].EventName);
+ Assert.Equal("WorkerPipeSessionCompleted", logger.Entries[1].EventName);
}
[Fact]
diff --git a/src/MxGateway.Worker.Tests/Ipc/WorkerPipeClientTests.cs b/src/MxGateway.Worker.Tests/Ipc/WorkerPipeClientTests.cs
index 36caa96..af97da5 100644
--- a/src/MxGateway.Worker.Tests/Ipc/WorkerPipeClientTests.cs
+++ b/src/MxGateway.Worker.Tests/Ipc/WorkerPipeClientTests.cs
@@ -1,10 +1,15 @@
using System;
+using System.IO;
using System.IO.Pipes;
+using System.Threading;
using System.Threading.Tasks;
+using Google.Protobuf.WellKnownTypes;
using MxGateway.Contracts;
using MxGateway.Contracts.Proto;
using MxGateway.Worker.Bootstrap;
using MxGateway.Worker.Ipc;
+using MxGateway.Worker.MxAccess;
+using MxGateway.Worker.Sta;
namespace MxGateway.Worker.Tests.Ipc;
@@ -28,7 +33,9 @@ public sealed class WorkerPipeClientTests
PipeTransmissionMode.Byte,
PipeOptions.Asynchronous);
- WorkerPipeClient client = new(connectTimeoutMilliseconds: 5000);
+ WorkerPipeClient client = new(
+ connectTimeoutMilliseconds: 5000,
+ (stream, options) => CreateSession(stream, options));
Task clientTask = client.RunAsync(workerOptions);
await Task.Factory.FromAsync(server.BeginWaitForConnection, server.EndWaitForConnection, null);
@@ -56,6 +63,94 @@ public sealed class WorkerPipeClientTests
WorkerEnvelope ready = await reader.ReadAsync();
Assert.Equal(WorkerEnvelope.BodyOneofCase.WorkerReady, ready.BodyCase);
+ await writer.WriteAsync(new WorkerEnvelope
+ {
+ ProtocolVersion = GatewayContractInfo.WorkerProtocolVersion,
+ SessionId = "session-1",
+ Sequence = 2,
+ WorkerShutdown = new WorkerShutdown
+ {
+ GracePeriod = Duration.FromTimeSpan(TimeSpan.FromSeconds(1)),
+ Reason = "test-complete",
+ },
+ });
+
+ WorkerEnvelope shutdownAck = await reader.ReadAsync();
+ Assert.Equal(WorkerEnvelope.BodyOneofCase.WorkerShutdownAck, shutdownAck.BodyCase);
await clientTask;
}
+
+ private static WorkerPipeSession CreateSession(
+ Stream stream,
+ WorkerFrameProtocolOptions options)
+ {
+ return new WorkerPipeSession(
+ new WorkerFrameReader(stream, options),
+ new WorkerFrameWriter(stream, options),
+ options,
+ () => 1234,
+ new WorkerPipeSessionOptions
+ {
+ HeartbeatInterval = TimeSpan.FromSeconds(30),
+ HeartbeatGrace = TimeSpan.FromSeconds(30),
+ },
+ () => new FakeRuntimeSession());
+ }
+
+ private sealed class FakeRuntimeSession : IWorkerRuntimeSession
+ {
+ public Task StartAsync(
+ string sessionId,
+ int workerProcessId,
+ CancellationToken cancellationToken = default)
+ {
+ return Task.FromResult(new WorkerReady
+ {
+ WorkerProcessId = workerProcessId,
+ MxaccessProgid = MxGateway.Worker.MxAccess.MxAccessInteropInfo.ProgId,
+ MxaccessClsid = MxGateway.Worker.MxAccess.MxAccessInteropInfo.Clsid,
+ ReadyTimestamp = Timestamp.FromDateTimeOffset(DateTimeOffset.UtcNow),
+ });
+ }
+
+ public Task DispatchAsync(StaCommand command)
+ {
+ return Task.FromResult(new MxCommandReply
+ {
+ SessionId = command.SessionId,
+ CorrelationId = command.CorrelationId,
+ Kind = command.Kind,
+ ProtocolStatus = new ProtocolStatus
+ {
+ Code = ProtocolStatusCode.Ok,
+ Message = "OK",
+ },
+ });
+ }
+
+ public WorkerRuntimeHeartbeatSnapshot CaptureHeartbeat()
+ {
+ return new WorkerRuntimeHeartbeatSnapshot(
+ DateTimeOffset.UtcNow,
+ pendingCommandCount: 0,
+ outboundEventQueueDepth: 0,
+ lastEventSequence: 0,
+ currentCommandCorrelationId: string.Empty);
+ }
+
+ public void RequestShutdown()
+ {
+ }
+
+ public Task ShutdownGracefullyAsync(
+ TimeSpan timeout,
+ CancellationToken cancellationToken = default)
+ {
+ return Task.FromResult(new MxAccessShutdownResult(Array.Empty()));
+ }
+
+ public void Dispose()
+ {
+ }
+ }
}
diff --git a/src/MxGateway.Worker.Tests/Ipc/WorkerPipeSessionTests.cs b/src/MxGateway.Worker.Tests/Ipc/WorkerPipeSessionTests.cs
index 1e5ee5a..4de1fd2 100644
--- a/src/MxGateway.Worker.Tests/Ipc/WorkerPipeSessionTests.cs
+++ b/src/MxGateway.Worker.Tests/Ipc/WorkerPipeSessionTests.cs
@@ -1,12 +1,16 @@
using System;
using System.Collections.Generic;
using System.IO;
+using System.IO.Pipes;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
+using Google.Protobuf.WellKnownTypes;
using MxGateway.Contracts;
using MxGateway.Contracts.Proto;
using MxGateway.Worker.Ipc;
+using MxGateway.Worker.MxAccess;
+using MxGateway.Worker.Sta;
namespace MxGateway.Worker.Tests.Ipc;
@@ -149,26 +153,124 @@ public sealed class WorkerPipeSessionTests
}
[Fact]
- public async Task RunAsync_WithWorkerShutdown_WritesShutdownAckAndReturns()
+ public async Task RunAsync_SendsHeartbeatPayloadFromRuntimeSnapshot()
{
- WorkerFrameProtocolOptions options = CreateOptions();
- MemoryStream inbound = new();
- WorkerFrameWriter inboundWriter = new(inbound, options);
- await inboundWriter.WriteAsync(CreateGatewayHelloEnvelope());
- await inboundWriter.WriteAsync(CreateWorkerShutdownEnvelope());
- inbound.Position = 0;
- MemoryStream outbound = new();
- WorkerPipeSession session = CreateSession(inbound, outbound, options);
+ using CancellationTokenSource cancellation = new(TimeSpan.FromSeconds(5));
+ using PipePair pipePair = await PipePair.CreateAsync(cancellation.Token);
+ FakeRuntimeSession runtime = new();
+ runtime.SetSnapshot(new WorkerRuntimeHeartbeatSnapshot(
+ DateTimeOffset.UtcNow,
+ pendingCommandCount: 2,
+ outboundEventQueueDepth: 3,
+ lastEventSequence: 42,
+ currentCommandCorrelationId: "current-command"));
+ WorkerPipeSession session = CreatePipeSession(
+ pipePair.WorkerStream,
+ runtime,
+ new WorkerPipeSessionOptions
+ {
+ HeartbeatInterval = TimeSpan.FromMilliseconds(20),
+ HeartbeatGrace = TimeSpan.FromSeconds(5),
+ });
+ Task runTask = session.RunAsync(cancellation.Token);
- await session.CompleteStartupHandshakeAsync(_ => Task.CompletedTask);
- await session.RunAsync();
+ await CompleteGatewayHandshakeAsync(pipePair, cancellation.Token);
+ await ThrowIfCompletedAsync(runTask);
- WorkerEnvelope[] written = ReadWrittenFrames(outbound, options);
- Assert.Equal(3, written.Length);
- Assert.Equal(WorkerEnvelope.BodyOneofCase.WorkerHello, written[0].BodyCase);
- Assert.Equal(WorkerEnvelope.BodyOneofCase.WorkerReady, written[1].BodyCase);
- Assert.Equal(WorkerEnvelope.BodyOneofCase.WorkerShutdownAck, written[2].BodyCase);
- Assert.Equal(ProtocolStatusCode.Ok, written[2].WorkerShutdownAck.Status.Code);
+ WorkerEnvelope heartbeat = await ReadUntilAsync(
+ pipePair.GatewayReader,
+ WorkerEnvelope.BodyOneofCase.WorkerHeartbeat,
+ cancellation.Token);
+
+ Assert.Equal(WorkerState.ExecutingCommand, heartbeat.WorkerHeartbeat.State);
+ Assert.Equal(1234, heartbeat.WorkerHeartbeat.WorkerProcessId);
+ Assert.Equal(2u, heartbeat.WorkerHeartbeat.PendingCommandCount);
+ Assert.Equal(3u, heartbeat.WorkerHeartbeat.OutboundEventQueueDepth);
+ Assert.Equal(42UL, heartbeat.WorkerHeartbeat.LastEventSequence);
+ Assert.Equal("current-command", heartbeat.WorkerHeartbeat.CurrentCommandCorrelationId);
+
+ await SendShutdownAndWaitAsync(pipePair, runTask, cancellation.Token);
+ }
+
+ [Fact]
+ public async Task RunAsync_WhenCommandIsExecuting_HeartbeatReportsCurrentCorrelation()
+ {
+ using CancellationTokenSource cancellation = new(TimeSpan.FromSeconds(5));
+ using PipePair pipePair = await PipePair.CreateAsync(cancellation.Token);
+ FakeRuntimeSession runtime = new()
+ {
+ BlockDispatch = true,
+ };
+ WorkerPipeSession session = CreatePipeSession(
+ pipePair.WorkerStream,
+ runtime,
+ new WorkerPipeSessionOptions
+ {
+ HeartbeatInterval = TimeSpan.FromMilliseconds(20),
+ HeartbeatGrace = TimeSpan.FromSeconds(5),
+ });
+ Task runTask = session.RunAsync(cancellation.Token);
+ await CompleteGatewayHandshakeAsync(pipePair, cancellation.Token);
+
+ await pipePair.GatewayWriter.WriteAsync(
+ CreateCommandEnvelope("command-1"),
+ cancellation.Token);
+
+ Assert.True(runtime.DispatchStarted.Wait(TimeSpan.FromSeconds(2)));
+ WorkerEnvelope heartbeat = await ReadUntilAsync(
+ pipePair.GatewayReader,
+ WorkerEnvelope.BodyOneofCase.WorkerHeartbeat,
+ envelope => envelope.WorkerHeartbeat.CurrentCommandCorrelationId == "command-1",
+ cancellation.Token);
+
+ Assert.Equal("command-1", heartbeat.WorkerHeartbeat.CurrentCommandCorrelationId);
+ Assert.Equal(WorkerState.ExecutingCommand, heartbeat.WorkerHeartbeat.State);
+
+ runtime.ReleaseDispatch();
+ WorkerEnvelope reply = await ReadUntilAsync(
+ pipePair.GatewayReader,
+ WorkerEnvelope.BodyOneofCase.WorkerCommandReply,
+ cancellation.Token);
+
+ Assert.Equal("command-1", reply.CorrelationId);
+ Assert.Equal(ProtocolStatusCode.Ok, reply.WorkerCommandReply.Reply.ProtocolStatus.Code);
+
+ await SendShutdownAndWaitAsync(pipePair, runTask, cancellation.Token);
+ }
+
+ [Fact]
+ public async Task RunAsync_WhenStaActivityIsStale_WritesWatchdogFault()
+ {
+ using CancellationTokenSource cancellation = new(TimeSpan.FromSeconds(5));
+ using PipePair pipePair = await PipePair.CreateAsync(cancellation.Token);
+ FakeRuntimeSession runtime = new();
+ runtime.SetSnapshot(new WorkerRuntimeHeartbeatSnapshot(
+ DateTimeOffset.UtcNow - TimeSpan.FromSeconds(5),
+ pendingCommandCount: 0,
+ outboundEventQueueDepth: 0,
+ lastEventSequence: 0,
+ currentCommandCorrelationId: "stuck-command"));
+ WorkerPipeSession session = CreatePipeSession(
+ pipePair.WorkerStream,
+ runtime,
+ new WorkerPipeSessionOptions
+ {
+ HeartbeatInterval = TimeSpan.FromMilliseconds(20),
+ HeartbeatGrace = TimeSpan.FromMilliseconds(50),
+ });
+ Task runTask = session.RunAsync(cancellation.Token);
+ await CompleteGatewayHandshakeAsync(pipePair, cancellation.Token);
+
+ WorkerEnvelope fault = await ReadUntilAsync(
+ pipePair.GatewayReader,
+ WorkerEnvelope.BodyOneofCase.WorkerFault,
+ cancellation.Token);
+
+ Assert.Equal(WorkerFaultCategory.StaHung, fault.WorkerFault.Category);
+ Assert.Equal("stuck-command", fault.WorkerFault.CommandMethod);
+ Assert.Contains("STA activity is stale", fault.WorkerFault.DiagnosticMessage);
+
+ await SendShutdownAndWaitAsync(pipePair, runTask, cancellation.Token);
}
private static WorkerPipeSession CreateSession(
@@ -183,6 +285,21 @@ public sealed class WorkerPipeSessionTests
() => 1234);
}
+ private static WorkerPipeSession CreatePipeSession(
+ Stream stream,
+ FakeRuntimeSession runtime,
+ WorkerPipeSessionOptions sessionOptions)
+ {
+ WorkerFrameProtocolOptions options = CreateOptions();
+ return new WorkerPipeSession(
+ new WorkerFrameReader(stream, options),
+ new WorkerFrameWriter(stream, options),
+ options,
+ () => 1234,
+ sessionOptions,
+ () => runtime);
+ }
+
private static WorkerFrameProtocolOptions CreateOptions()
{
return new WorkerFrameProtocolOptions(
@@ -209,21 +326,119 @@ public sealed class WorkerPipeSessionTests
};
}
- private static WorkerEnvelope CreateWorkerShutdownEnvelope()
+ private static WorkerEnvelope CreateCommandEnvelope(string correlationId)
{
return new WorkerEnvelope
{
ProtocolVersion = GatewayContractInfo.WorkerProtocolVersion,
SessionId = SessionId,
Sequence = 2,
- WorkerShutdown = new WorkerShutdown
+ CorrelationId = correlationId,
+ WorkerCommand = new WorkerCommand
{
- GracePeriod = Google.Protobuf.WellKnownTypes.Duration.FromTimeSpan(TimeSpan.FromSeconds(1)),
- Reason = "test-shutdown",
+ Command = new MxCommand
+ {
+ Kind = MxCommandKind.Ping,
+ Ping = new PingCommand
+ {
+ Message = "ping",
+ },
+ },
+ EnqueueTimestamp = Timestamp.FromDateTimeOffset(DateTimeOffset.UtcNow),
},
};
}
+ private static WorkerEnvelope CreateShutdownEnvelope()
+ {
+ return new WorkerEnvelope
+ {
+ ProtocolVersion = GatewayContractInfo.WorkerProtocolVersion,
+ SessionId = SessionId,
+ Sequence = 3,
+ WorkerShutdown = new WorkerShutdown
+ {
+ GracePeriod = Duration.FromTimeSpan(TimeSpan.FromSeconds(1)),
+ Reason = "test-complete",
+ },
+ };
+ }
+
+ private static async Task CompleteGatewayHandshakeAsync(
+ PipePair pipePair,
+ CancellationToken cancellationToken)
+ {
+ await pipePair.GatewayWriter
+ .WriteAsync(CreateGatewayHelloEnvelope(), cancellationToken)
+ .ConfigureAwait(false);
+
+ WorkerEnvelope hello = await pipePair.GatewayReader.ReadAsync(cancellationToken).ConfigureAwait(false);
+ WorkerEnvelope ready = await pipePair.GatewayReader.ReadAsync(cancellationToken).ConfigureAwait(false);
+
+ Assert.Equal(WorkerEnvelope.BodyOneofCase.WorkerHello, hello.BodyCase);
+ Assert.Equal(WorkerEnvelope.BodyOneofCase.WorkerReady, ready.BodyCase);
+ }
+
+ private static async Task SendShutdownAndWaitAsync(
+ PipePair pipePair,
+ Task runTask,
+ CancellationToken cancellationToken)
+ {
+ await pipePair.GatewayWriter
+ .WriteAsync(CreateShutdownEnvelope(), cancellationToken)
+ .ConfigureAwait(false);
+
+ WorkerEnvelope shutdownAck = await ReadUntilAsync(
+ pipePair.GatewayReader,
+ WorkerEnvelope.BodyOneofCase.WorkerShutdownAck,
+ cancellationToken);
+
+ Assert.Equal(ProtocolStatusCode.Ok, shutdownAck.WorkerShutdownAck.Status.Code);
+ Task completedTask = await Task
+ .WhenAny(runTask, Task.Delay(TimeSpan.FromSeconds(2), cancellationToken))
+ .ConfigureAwait(false);
+
+ Assert.Same(runTask, completedTask);
+ await runTask.ConfigureAwait(false);
+ }
+
+ private static async Task ThrowIfCompletedAsync(Task task)
+ {
+ await Task.Delay(TimeSpan.FromMilliseconds(100));
+ if (task.IsCompleted)
+ {
+ await task;
+ }
+ }
+
+ private static Task ReadUntilAsync(
+ WorkerFrameReader reader,
+ WorkerEnvelope.BodyOneofCase expectedBody,
+ CancellationToken cancellationToken)
+ {
+ return ReadUntilAsync(
+ reader,
+ expectedBody,
+ _ => true,
+ cancellationToken);
+ }
+
+ private static async Task ReadUntilAsync(
+ WorkerFrameReader reader,
+ WorkerEnvelope.BodyOneofCase expectedBody,
+ Func predicate,
+ CancellationToken cancellationToken)
+ {
+ while (true)
+ {
+ WorkerEnvelope envelope = await reader.ReadAsync(cancellationToken).ConfigureAwait(false);
+ if (envelope.BodyCase == expectedBody && predicate(envelope))
+ {
+ return envelope;
+ }
+ }
+ }
+
private static WorkerEnvelope[] ReadWrittenFrames(
MemoryStream stream,
WorkerFrameProtocolOptions options)
@@ -258,4 +473,166 @@ public sealed class WorkerPipeSessionTests
buffer[2] = (byte)(value >> 16);
buffer[3] = (byte)(value >> 24);
}
+
+ private sealed class FakeRuntimeSession : IWorkerRuntimeSession
+ {
+ private readonly ManualResetEventSlim releaseDispatch = new(false);
+ private readonly object gate = new();
+ private WorkerRuntimeHeartbeatSnapshot snapshot = new(
+ DateTimeOffset.UtcNow,
+ pendingCommandCount: 0,
+ outboundEventQueueDepth: 0,
+ lastEventSequence: 0,
+ currentCommandCorrelationId: string.Empty);
+
+ public ManualResetEventSlim DispatchStarted { get; } = new(false);
+
+ public bool BlockDispatch { get; set; }
+
+ public Task StartAsync(
+ string sessionId,
+ int workerProcessId,
+ CancellationToken cancellationToken = default)
+ {
+ return Task.FromResult(new WorkerReady
+ {
+ WorkerProcessId = workerProcessId,
+ MxaccessProgid = MxGateway.Worker.MxAccess.MxAccessInteropInfo.ProgId,
+ MxaccessClsid = MxGateway.Worker.MxAccess.MxAccessInteropInfo.Clsid,
+ ReadyTimestamp = Timestamp.FromDateTimeOffset(DateTimeOffset.UtcNow),
+ });
+ }
+
+ public Task DispatchAsync(StaCommand command)
+ {
+ return Task.Run(
+ () =>
+ {
+ SetSnapshot(new WorkerRuntimeHeartbeatSnapshot(
+ DateTimeOffset.UtcNow,
+ pendingCommandCount: 0,
+ outboundEventQueueDepth: 0,
+ lastEventSequence: 0,
+ command.CorrelationId));
+ DispatchStarted.Set();
+
+ if (BlockDispatch)
+ {
+ releaseDispatch.Wait(TimeSpan.FromSeconds(5));
+ }
+
+ SetSnapshot(new WorkerRuntimeHeartbeatSnapshot(
+ DateTimeOffset.UtcNow,
+ pendingCommandCount: 0,
+ outboundEventQueueDepth: 0,
+ lastEventSequence: 0,
+ currentCommandCorrelationId: string.Empty));
+
+ return new MxCommandReply
+ {
+ SessionId = command.SessionId,
+ CorrelationId = command.CorrelationId,
+ Kind = command.Kind,
+ ProtocolStatus = new ProtocolStatus
+ {
+ Code = ProtocolStatusCode.Ok,
+ Message = "OK",
+ },
+ };
+ });
+ }
+
+ public WorkerRuntimeHeartbeatSnapshot CaptureHeartbeat()
+ {
+ lock (gate)
+ {
+ return snapshot;
+ }
+ }
+
+ public void RequestShutdown()
+ {
+ releaseDispatch.Set();
+ }
+
+ public Task ShutdownGracefullyAsync(
+ TimeSpan timeout,
+ CancellationToken cancellationToken = default)
+ {
+ releaseDispatch.Set();
+ return Task.FromResult(new MxAccessShutdownResult(Array.Empty()));
+ }
+
+ public void ReleaseDispatch()
+ {
+ releaseDispatch.Set();
+ }
+
+ public void SetSnapshot(WorkerRuntimeHeartbeatSnapshot value)
+ {
+ lock (gate)
+ {
+ snapshot = value;
+ }
+ }
+
+ public void Dispose()
+ {
+ releaseDispatch.Set();
+ releaseDispatch.Dispose();
+ DispatchStarted.Dispose();
+ }
+ }
+
+ private sealed class PipePair : IDisposable
+ {
+ private readonly NamedPipeServerStream gatewayStream;
+
+ private PipePair(
+ NamedPipeServerStream gatewayStream,
+ NamedPipeClientStream workerStream)
+ {
+ this.gatewayStream = gatewayStream;
+ WorkerStream = workerStream;
+ WorkerFrameProtocolOptions options = CreateOptions();
+ GatewayReader = new WorkerFrameReader(gatewayStream, options);
+ GatewayWriter = new WorkerFrameWriter(gatewayStream, options);
+ }
+
+ public Stream WorkerStream { get; }
+
+ public WorkerFrameReader GatewayReader { get; }
+
+ public WorkerFrameWriter GatewayWriter { get; }
+
+ public static async Task CreateAsync(CancellationToken cancellationToken)
+ {
+ string pipeName = $"mxaccessgw-worker-session-tests-{Guid.NewGuid():N}";
+ NamedPipeServerStream gatewayStream = new(
+ pipeName,
+ PipeDirection.InOut,
+ maxNumberOfServerInstances: 1,
+ PipeTransmissionMode.Byte,
+ PipeOptions.Asynchronous);
+ NamedPipeClientStream workerStream = new(
+ ".",
+ pipeName,
+ PipeDirection.InOut,
+ PipeOptions.Asynchronous);
+
+ Task waitForConnectionTask = gatewayStream.WaitForConnectionAsync();
+ await Task
+ .Run(() => workerStream.Connect(5000), cancellationToken)
+ .ConfigureAwait(false);
+ await waitForConnectionTask.ConfigureAwait(false);
+
+ return new PipePair(gatewayStream, workerStream);
+ }
+
+ public void Dispose()
+ {
+ WorkerStream.Dispose();
+ gatewayStream.Dispose();
+ }
+ }
}
diff --git a/src/MxGateway.Worker/Ipc/WorkerPipeClient.cs b/src/MxGateway.Worker/Ipc/WorkerPipeClient.cs
index 2a7dcbf..5fd0c5a 100644
--- a/src/MxGateway.Worker/Ipc/WorkerPipeClient.cs
+++ b/src/MxGateway.Worker/Ipc/WorkerPipeClient.cs
@@ -1,4 +1,5 @@
using System;
+using System.IO;
using System.IO.Pipes;
using System.Threading;
using System.Threading.Tasks;
@@ -11,6 +12,7 @@ public sealed class WorkerPipeClient : IWorkerPipeClient
public const int DefaultConnectTimeoutMilliseconds = 30000;
private readonly int _connectTimeoutMilliseconds;
+ private readonly Func _sessionFactory;
private readonly IWorkerLogger? _logger;
public WorkerPipeClient()
@@ -28,9 +30,30 @@ public sealed class WorkerPipeClient : IWorkerPipeClient
{
}
+ public WorkerPipeClient(
+ int connectTimeoutMilliseconds,
+ Func sessionFactory)
+ : this(
+ null,
+ connectTimeoutMilliseconds,
+ (stream, frameOptions, _) => sessionFactory(stream, frameOptions))
+ {
+ }
+
public WorkerPipeClient(
IWorkerLogger? logger,
int connectTimeoutMilliseconds)
+ : this(
+ logger,
+ connectTimeoutMilliseconds,
+ (stream, frameOptions, workerLogger) => new WorkerPipeSession(stream, frameOptions, workerLogger))
+ {
+ }
+
+ public WorkerPipeClient(
+ IWorkerLogger? logger,
+ int connectTimeoutMilliseconds,
+ Func sessionFactory)
{
if (connectTimeoutMilliseconds <= 0)
{
@@ -39,8 +62,9 @@ public sealed class WorkerPipeClient : IWorkerPipeClient
"Worker pipe connect timeout must be greater than zero.");
}
- _connectTimeoutMilliseconds = connectTimeoutMilliseconds;
_logger = logger;
+ _sessionFactory = sessionFactory ?? throw new ArgumentNullException(nameof(sessionFactory));
+ _connectTimeoutMilliseconds = connectTimeoutMilliseconds;
}
public async Task RunAsync(
@@ -62,8 +86,7 @@ public sealed class WorkerPipeClient : IWorkerPipeClient
await ConnectAsync(pipe, cancellationToken).ConfigureAwait(false);
- WorkerPipeSession session = new(pipe, frameOptions, _logger);
- await session.CompleteStartupHandshakeAsync(cancellationToken).ConfigureAwait(false);
+ WorkerPipeSession session = _sessionFactory(pipe, frameOptions, _logger);
await session.RunAsync(cancellationToken).ConfigureAwait(false);
}
diff --git a/src/MxGateway.Worker/Ipc/WorkerPipeSession.cs b/src/MxGateway.Worker/Ipc/WorkerPipeSession.cs
index 075262a..3bf0ffd 100644
--- a/src/MxGateway.Worker/Ipc/WorkerPipeSession.cs
+++ b/src/MxGateway.Worker/Ipc/WorkerPipeSession.cs
@@ -16,12 +16,15 @@ public sealed class WorkerPipeSession
{
private readonly WorkerFrameProtocolOptions _options;
private readonly Func _processIdProvider;
+ private readonly Func _runtimeSessionFactory;
+ private readonly WorkerPipeSessionOptions _sessionOptions;
private readonly IWorkerLogger? _logger;
private readonly WorkerFrameReader _reader;
private readonly WorkerFrameWriter _writer;
- private MxAccessStaSession? _mxAccessStaSession;
+ private IWorkerRuntimeSession? _runtimeSession;
private long _nextSequence;
- private bool _shutdownCompleted;
+ private WorkerState _state = WorkerState.Starting;
+ private bool _watchdogFaultSent;
private bool _shutdownTimedOut;
public WorkerPipeSession(
@@ -33,22 +36,67 @@ public sealed class WorkerPipeSession
new WorkerFrameWriter(stream, options),
options,
() => Process.GetCurrentProcess().Id,
+ new WorkerPipeSessionOptions(),
+ () => new MxAccessStaSession(),
logger)
{
}
+ public WorkerPipeSession(
+ WorkerFrameReader reader,
+ WorkerFrameWriter writer,
+ WorkerFrameProtocolOptions options,
+ Func processIdProvider)
+ : this(
+ reader,
+ writer,
+ options,
+ processIdProvider,
+ new WorkerPipeSessionOptions(),
+ () => new MxAccessStaSession(),
+ logger: null)
+ {
+ }
+
public WorkerPipeSession(
WorkerFrameReader reader,
WorkerFrameWriter writer,
WorkerFrameProtocolOptions options,
Func processIdProvider,
+ WorkerPipeSessionOptions sessionOptions,
+ Func runtimeSessionFactory,
IWorkerLogger? logger = null)
{
_reader = reader ?? throw new ArgumentNullException(nameof(reader));
_writer = writer ?? throw new ArgumentNullException(nameof(writer));
_options = options ?? throw new ArgumentNullException(nameof(options));
_processIdProvider = processIdProvider ?? throw new ArgumentNullException(nameof(processIdProvider));
+ _sessionOptions = sessionOptions ?? throw new ArgumentNullException(nameof(sessionOptions));
+ _runtimeSessionFactory = runtimeSessionFactory ?? throw new ArgumentNullException(nameof(runtimeSessionFactory));
_logger = logger;
+ _sessionOptions.Validate();
+ }
+
+ public async Task RunAsync(CancellationToken cancellationToken = default)
+ {
+ _runtimeSession = _runtimeSessionFactory();
+ try
+ {
+ await CompleteStartupHandshakeAsync(
+ token => _runtimeSession.StartAsync(_options.SessionId, _processIdProvider(), token),
+ cancellationToken).ConfigureAwait(false);
+ await RunMessageLoopAsync(cancellationToken).ConfigureAwait(false);
+ }
+ finally
+ {
+ if (!_shutdownTimedOut)
+ {
+ _runtimeSession?.Dispose();
+ }
+
+ _runtimeSession = null;
+ _state = WorkerState.Stopped;
+ }
}
public Task CompleteStartupHandshakeAsync(CancellationToken cancellationToken = default)
@@ -86,11 +134,14 @@ public sealed class WorkerPipeSession
try
{
WorkerEnvelope envelope = await _reader.ReadAsync(cancellationToken).ConfigureAwait(false);
+ _state = WorkerState.Handshaking;
ValidateGatewayHello(envelope);
await WriteWorkerHelloAsync(cancellationToken).ConfigureAwait(false);
+ _state = WorkerState.InitializingSta;
WorkerReady ready = await initializeMxAccessAsync(cancellationToken).ConfigureAwait(false);
await WriteWorkerReadyAsync(ready, cancellationToken).ConfigureAwait(false);
+ _state = WorkerState.Ready;
}
catch (WorkerFrameProtocolException exception)
{
@@ -105,44 +156,6 @@ public sealed class WorkerPipeSession
}
}
- public async Task RunAsync(CancellationToken cancellationToken = default)
- {
- try
- {
- while (true)
- {
- WorkerEnvelope envelope = await _reader.ReadAsync(cancellationToken).ConfigureAwait(false);
- switch (envelope.BodyCase)
- {
- case WorkerEnvelope.BodyOneofCase.WorkerCommand:
- await HandleCommandAsync(envelope, cancellationToken).ConfigureAwait(false);
- break;
- case WorkerEnvelope.BodyOneofCase.WorkerShutdown:
- await HandleShutdownAsync(envelope.WorkerShutdown, cancellationToken).ConfigureAwait(false);
- return;
- case WorkerEnvelope.BodyOneofCase.WorkerCancel:
- break;
- default:
- throw new WorkerFrameProtocolException(
- WorkerFrameProtocolErrorCode.UnexpectedEnvelopeBody,
- $"Worker received unexpected gateway envelope body {envelope.BodyCase} after startup.");
- }
- }
- }
- catch (WorkerFrameProtocolException exception)
- {
- await TryWriteFaultAsync(exception, cancellationToken).ConfigureAwait(false);
- throw;
- }
- finally
- {
- if (!_shutdownCompleted && !_shutdownTimedOut)
- {
- _mxAccessStaSession?.Dispose();
- }
- }
- }
-
private void ValidateGatewayHello(WorkerEnvelope envelope)
{
if (envelope.BodyCase != WorkerEnvelope.BodyOneofCase.GatewayHello)
@@ -188,6 +201,189 @@ public sealed class WorkerPipeSession
return _writer.WriteAsync(CreateEnvelope(ready), cancellationToken);
}
+ private async Task RunMessageLoopAsync(CancellationToken cancellationToken)
+ {
+ using CancellationTokenSource heartbeatCancellation = CancellationTokenSource
+ .CreateLinkedTokenSource(cancellationToken);
+ Task heartbeatTask = RunHeartbeatLoopAsync(heartbeatCancellation.Token);
+
+ try
+ {
+ while (!cancellationToken.IsCancellationRequested)
+ {
+ Task readTask = _reader.ReadAsync(cancellationToken);
+ Task completedTask = await Task.WhenAny(readTask, heartbeatTask).ConfigureAwait(false);
+ if (completedTask == heartbeatTask)
+ {
+ await heartbeatTask.ConfigureAwait(false);
+ }
+
+ WorkerEnvelope envelope = await readTask.ConfigureAwait(false);
+ bool keepReading = await DispatchGatewayEnvelopeAsync(envelope, cancellationToken).ConfigureAwait(false);
+ if (!keepReading)
+ {
+ return;
+ }
+ }
+ }
+ finally
+ {
+ heartbeatCancellation.Cancel();
+ try
+ {
+ await heartbeatTask.ConfigureAwait(false);
+ }
+ catch (OperationCanceledException)
+ {
+ }
+ }
+ }
+
+ private async Task DispatchGatewayEnvelopeAsync(
+ WorkerEnvelope envelope,
+ CancellationToken cancellationToken)
+ {
+ switch (envelope.BodyCase)
+ {
+ case WorkerEnvelope.BodyOneofCase.WorkerCommand:
+ _ = ProcessCommandAsync(envelope, cancellationToken);
+ return true;
+ case WorkerEnvelope.BodyOneofCase.WorkerShutdown:
+ await ShutdownAsync(envelope.WorkerShutdown, cancellationToken).ConfigureAwait(false);
+ return false;
+ case WorkerEnvelope.BodyOneofCase.WorkerCancel:
+ return true;
+ default:
+ throw new WorkerFrameProtocolException(
+ WorkerFrameProtocolErrorCode.UnexpectedEnvelopeBody,
+ $"Worker received unexpected gateway envelope body {envelope.BodyCase}.");
+ }
+ }
+
+ private async Task ProcessCommandAsync(
+ WorkerEnvelope envelope,
+ CancellationToken cancellationToken)
+ {
+ IWorkerRuntimeSession runtimeSession = _runtimeSession
+ ?? throw new InvalidOperationException("Worker runtime session has not been initialized.");
+ WorkerCommand workerCommand = envelope.WorkerCommand;
+ MxCommand command = workerCommand.Command;
+ StaCommand staCommand = new(
+ _options.SessionId,
+ envelope.CorrelationId,
+ command,
+ workerCommand.EnqueueTimestamp,
+ cancellationToken);
+
+ try
+ {
+ MxCommandReply reply = await runtimeSession.DispatchAsync(staCommand).ConfigureAwait(false);
+ await _writer
+ .WriteAsync(
+ CreateEnvelope(new WorkerCommandReply
+ {
+ Reply = reply,
+ CompletedTimestamp = Timestamp.FromDateTime(DateTime.UtcNow),
+ }),
+ cancellationToken)
+ .ConfigureAwait(false);
+ }
+ catch (Exception exception) when (exception is not OperationCanceledException)
+ {
+ _state = WorkerState.Faulted;
+ await TryWriteFaultAsync(
+ CreateFault(
+ WorkerFaultCategory.MxaccessCommandFailed,
+ staCommand.MethodName,
+ exception),
+ cancellationToken).ConfigureAwait(false);
+ }
+ }
+
+ private async Task ShutdownAsync(
+ WorkerShutdown shutdown,
+ CancellationToken cancellationToken)
+ {
+ _state = WorkerState.ShuttingDown;
+ IWorkerRuntimeSession? runtimeSession = _runtimeSession;
+ if (runtimeSession is null)
+ {
+ await WriteShutdownAckAsync(
+ CreateShutdownAck(new MxAccessShutdownResult(Array.Empty()), shutdown),
+ cancellationToken).ConfigureAwait(false);
+ return;
+ }
+
+ TimeSpan gracePeriod = ResolveGracePeriod(shutdown);
+ try
+ {
+ MxAccessShutdownResult result = await runtimeSession
+ .ShutdownGracefullyAsync(gracePeriod, cancellationToken)
+ .ConfigureAwait(false);
+ LogShutdownFailures(result.Failures);
+ await WriteShutdownAckAsync(CreateShutdownAck(result, shutdown), cancellationToken).ConfigureAwait(false);
+ }
+ catch (TimeoutException exception)
+ {
+ _shutdownTimedOut = true;
+ _state = WorkerState.Faulted;
+ await TryWriteFaultAsync(CreateShutdownTimeoutFault(exception), cancellationToken).ConfigureAwait(false);
+ throw;
+ }
+ }
+
+ private Task WriteShutdownAckAsync(
+ WorkerShutdownAck shutdownAck,
+ CancellationToken cancellationToken)
+ {
+ return _writer.WriteAsync(CreateEnvelope(shutdownAck), cancellationToken);
+ }
+
+ private async Task RunHeartbeatLoopAsync(CancellationToken cancellationToken)
+ {
+ while (!cancellationToken.IsCancellationRequested)
+ {
+ await Task.Delay(_sessionOptions.HeartbeatInterval, cancellationToken).ConfigureAwait(false);
+ IWorkerRuntimeSession? runtimeSession = _runtimeSession;
+ if (runtimeSession is null)
+ {
+ continue;
+ }
+
+ WorkerRuntimeHeartbeatSnapshot snapshot = runtimeSession.CaptureHeartbeat();
+ await _writer
+ .WriteAsync(CreateEnvelope(CreateHeartbeat(snapshot)), cancellationToken)
+ .ConfigureAwait(false);
+
+ await ReportWatchdogFaultIfNeededAsync(snapshot, cancellationToken).ConfigureAwait(false);
+ }
+ }
+
+ private async Task ReportWatchdogFaultIfNeededAsync(
+ WorkerRuntimeHeartbeatSnapshot snapshot,
+ CancellationToken cancellationToken)
+ {
+ TimeSpan staleFor = DateTimeOffset.UtcNow - snapshot.LastStaActivityUtc;
+ if (staleFor <= _sessionOptions.HeartbeatGrace)
+ {
+ _watchdogFaultSent = false;
+ return;
+ }
+
+ if (_watchdogFaultSent)
+ {
+ return;
+ }
+
+ _watchdogFaultSent = true;
+ await TryWriteFaultAsync(
+ CreateFault(
+ WorkerFaultCategory.StaHung,
+ snapshot.CurrentCommandCorrelationId,
+ $"STA activity is stale by {staleFor}."),
+ cancellationToken).ConfigureAwait(false);
+ }
+
private async Task TryWriteFaultAsync(
WorkerFrameProtocolException exception,
CancellationToken cancellationToken)
@@ -241,7 +437,7 @@ public sealed class WorkerPipeSession
|| faultWriteException is ObjectDisposedException
|| faultWriteException is WorkerFrameProtocolException)
{
- // The shutdown timeout is the actionable error.
+ // The runtime fault remains observable through worker exit or pipe closure.
}
}
@@ -265,16 +461,16 @@ public sealed class WorkerPipeSession
return CreateBaseEnvelope(reply);
}
- private WorkerEnvelope CreateEnvelope(WorkerEvent workerEvent)
- {
- return CreateBaseEnvelope(workerEvent);
- }
-
private WorkerEnvelope CreateEnvelope(WorkerShutdownAck shutdownAck)
{
return CreateBaseEnvelope(shutdownAck);
}
+ private WorkerEnvelope CreateEnvelope(WorkerHeartbeat heartbeat)
+ {
+ return CreateBaseEnvelope(heartbeat);
+ }
+
private WorkerEnvelope CreateBaseEnvelope(WorkerHello body)
{
WorkerEnvelope envelope = CreateBaseEnvelope();
@@ -304,13 +500,6 @@ public sealed class WorkerPipeSession
return envelope;
}
- private WorkerEnvelope CreateBaseEnvelope(WorkerEvent body)
- {
- WorkerEnvelope envelope = CreateBaseEnvelope();
- envelope.WorkerEvent = body.Clone();
- return envelope;
- }
-
private WorkerEnvelope CreateBaseEnvelope(WorkerShutdownAck body)
{
WorkerEnvelope envelope = CreateBaseEnvelope();
@@ -318,6 +507,13 @@ public sealed class WorkerPipeSession
return envelope;
}
+ private WorkerEnvelope CreateBaseEnvelope(WorkerHeartbeat body)
+ {
+ WorkerEnvelope envelope = CreateBaseEnvelope();
+ envelope.WorkerHeartbeat = body;
+ return envelope;
+ }
+
private WorkerEnvelope CreateBaseEnvelope()
{
return new WorkerEnvelope
@@ -335,88 +531,37 @@ public sealed class WorkerPipeSession
private async Task InitializeMxAccessAsync(CancellationToken cancellationToken)
{
- _mxAccessStaSession = new MxAccessStaSession();
+ _runtimeSession = new MxAccessStaSession();
try
{
- return await _mxAccessStaSession
+ return await _runtimeSession
.StartAsync(_options.SessionId, _processIdProvider(), cancellationToken)
.ConfigureAwait(false);
}
catch
{
- _mxAccessStaSession.Dispose();
- _mxAccessStaSession = null;
+ _runtimeSession.Dispose();
+ _runtimeSession = null;
throw;
}
}
- private async Task HandleCommandAsync(
- WorkerEnvelope envelope,
- CancellationToken cancellationToken)
+ private WorkerHeartbeat CreateHeartbeat(WorkerRuntimeHeartbeatSnapshot snapshot)
{
- if (_mxAccessStaSession is null)
- {
- throw new InvalidOperationException("MXAccess STA session is not initialized.");
- }
+ WorkerState state = string.IsNullOrWhiteSpace(snapshot.CurrentCommandCorrelationId)
+ ? _state
+ : WorkerState.ExecutingCommand;
- StaCommand command = new(
- _options.SessionId,
- envelope.CorrelationId,
- envelope.WorkerCommand.Command,
- envelope.WorkerCommand.EnqueueTimestamp,
- cancellationToken);
-
- MxCommandReply mxReply = await _mxAccessStaSession
- .DispatchAsync(command)
- .ConfigureAwait(false);
- WorkerCommandReply reply = new()
+ return new WorkerHeartbeat
{
- Reply = mxReply,
- CompletedTimestamp = Timestamp.FromDateTime(DateTime.UtcNow),
+ WorkerProcessId = _processIdProvider(),
+ State = state,
+ LastStaActivityTimestamp = Timestamp.FromDateTimeOffset(snapshot.LastStaActivityUtc),
+ PendingCommandCount = snapshot.PendingCommandCount,
+ OutboundEventQueueDepth = snapshot.OutboundEventQueueDepth,
+ LastEventSequence = snapshot.LastEventSequence,
+ CurrentCommandCorrelationId = snapshot.CurrentCommandCorrelationId,
};
-
- await _writer.WriteAsync(CreateEnvelope(reply), cancellationToken).ConfigureAwait(false);
- await DrainEventsAsync(cancellationToken).ConfigureAwait(false);
- }
-
- private async Task HandleShutdownAsync(
- WorkerShutdown shutdown,
- CancellationToken cancellationToken)
- {
- TimeSpan gracePeriod = ResolveGracePeriod(shutdown);
- try
- {
- MxAccessShutdownResult result = _mxAccessStaSession is null
- ? new MxAccessShutdownResult(Array.Empty())
- : await _mxAccessStaSession
- .ShutdownGracefullyAsync(gracePeriod, cancellationToken)
- .ConfigureAwait(false);
-
- LogShutdownFailures(result.Failures);
- await _writer
- .WriteAsync(CreateEnvelope(CreateShutdownAck(result)), cancellationToken)
- .ConfigureAwait(false);
- _shutdownCompleted = true;
- }
- catch (TimeoutException exception)
- {
- _shutdownTimedOut = true;
- await TryWriteFaultAsync(CreateShutdownTimeoutFault(exception), cancellationToken).ConfigureAwait(false);
- throw;
- }
- }
-
- private async Task DrainEventsAsync(CancellationToken cancellationToken)
- {
- if (_mxAccessStaSession is null)
- {
- return;
- }
-
- foreach (WorkerEvent workerEvent in _mxAccessStaSession.DrainEvents(maxEvents: 0))
- {
- await _writer.WriteAsync(CreateEnvelope(workerEvent), cancellationToken).ConfigureAwait(false);
- }
}
private WorkerReady CreateWorkerReady()
@@ -443,16 +588,24 @@ public sealed class WorkerPipeSession
: gracePeriod;
}
- private static WorkerShutdownAck CreateShutdownAck(MxAccessShutdownResult result)
+ private static WorkerShutdownAck CreateShutdownAck(
+ MxAccessShutdownResult result,
+ WorkerShutdown shutdown)
{
+ string message = result.Succeeded
+ ? "Graceful shutdown completed."
+ : $"Graceful shutdown completed with {result.Failures.Count} cleanup failure(s).";
+ if (!string.IsNullOrWhiteSpace(shutdown.Reason))
+ {
+ message = $"{message} Reason: {shutdown.Reason}";
+ }
+
return new WorkerShutdownAck
{
Status = new ProtocolStatus
{
Code = ProtocolStatusCode.Ok,
- Message = result.Succeeded
- ? "Graceful shutdown completed."
- : $"Graceful shutdown completed with {result.Failures.Count} cleanup failure(s).",
+ Message = message,
},
};
}
@@ -511,22 +664,50 @@ public sealed class WorkerPipeSession
return fault;
}
- private static WorkerFault CreateShutdownTimeoutFault(TimeoutException exception)
+ private static WorkerFault CreateFault(
+ WorkerFaultCategory category,
+ string commandMethod,
+ Exception exception)
+ {
+ WorkerFault fault = CreateFault(
+ category,
+ commandMethod,
+ exception.Message);
+ fault.ExceptionType = exception.GetType().FullName ?? string.Empty;
+ fault.ProtocolStatus = new ProtocolStatus
+ {
+ Code = ProtocolStatusCode.WorkerUnavailable,
+ Message = exception.Message,
+ };
+ return fault;
+ }
+
+ private static WorkerFault CreateFault(
+ WorkerFaultCategory category,
+ string commandMethod,
+ string diagnosticMessage)
{
- string message = exception.Message;
return new WorkerFault
{
- Category = WorkerFaultCategory.ShutdownTimeout,
- ExceptionType = exception.GetType().FullName ?? string.Empty,
- DiagnosticMessage = message,
+ Category = category,
+ CommandMethod = commandMethod ?? string.Empty,
+ DiagnosticMessage = diagnosticMessage,
ProtocolStatus = new ProtocolStatus
{
Code = ProtocolStatusCode.WorkerUnavailable,
- Message = message,
+ Message = diagnosticMessage,
},
};
}
+ private static WorkerFault CreateShutdownTimeoutFault(TimeoutException exception)
+ {
+ return CreateFault(
+ WorkerFaultCategory.ShutdownTimeout,
+ commandMethod: string.Empty,
+ exception);
+ }
+
private static WorkerFaultCategory MapFaultCategory(WorkerFrameProtocolErrorCode errorCode)
{
return errorCode switch
diff --git a/src/MxGateway.Worker/Ipc/WorkerPipeSessionOptions.cs b/src/MxGateway.Worker/Ipc/WorkerPipeSessionOptions.cs
new file mode 100644
index 0000000..2e60463
--- /dev/null
+++ b/src/MxGateway.Worker/Ipc/WorkerPipeSessionOptions.cs
@@ -0,0 +1,36 @@
+using System;
+
+namespace MxGateway.Worker.Ipc;
+
+public sealed class WorkerPipeSessionOptions
+{
+ public static readonly TimeSpan DefaultHeartbeatInterval = TimeSpan.FromSeconds(5);
+ public static readonly TimeSpan DefaultHeartbeatGrace = TimeSpan.FromSeconds(15);
+
+ public WorkerPipeSessionOptions()
+ {
+ HeartbeatInterval = DefaultHeartbeatInterval;
+ HeartbeatGrace = DefaultHeartbeatGrace;
+ }
+
+ public TimeSpan HeartbeatInterval { get; set; }
+
+ public TimeSpan HeartbeatGrace { get; set; }
+
+ public void Validate()
+ {
+ if (HeartbeatInterval <= TimeSpan.Zero)
+ {
+ throw new ArgumentOutOfRangeException(
+ nameof(HeartbeatInterval),
+ "Worker heartbeat interval must be greater than zero.");
+ }
+
+ if (HeartbeatGrace <= TimeSpan.Zero)
+ {
+ throw new ArgumentOutOfRangeException(
+ nameof(HeartbeatGrace),
+ "Worker heartbeat grace must be greater than zero.");
+ }
+ }
+}
diff --git a/src/MxGateway.Worker/MxAccess/IWorkerRuntimeSession.cs b/src/MxGateway.Worker/MxAccess/IWorkerRuntimeSession.cs
new file mode 100644
index 0000000..7be0f3f
--- /dev/null
+++ b/src/MxGateway.Worker/MxAccess/IWorkerRuntimeSession.cs
@@ -0,0 +1,25 @@
+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 StartAsync(
+ string sessionId,
+ int workerProcessId,
+ CancellationToken cancellationToken = default);
+
+ Task DispatchAsync(StaCommand command);
+
+ WorkerRuntimeHeartbeatSnapshot CaptureHeartbeat();
+
+ void RequestShutdown();
+
+ Task ShutdownGracefullyAsync(
+ TimeSpan timeout,
+ CancellationToken cancellationToken = default);
+}
diff --git a/src/MxGateway.Worker/MxAccess/MxAccessStaSession.cs b/src/MxGateway.Worker/MxAccess/MxAccessStaSession.cs
index 2b6ed9c..1e2ad89 100644
--- a/src/MxGateway.Worker/MxAccess/MxAccessStaSession.cs
+++ b/src/MxGateway.Worker/MxAccess/MxAccessStaSession.cs
@@ -8,7 +8,7 @@ using MxGateway.Worker.Sta;
namespace MxGateway.Worker.MxAccess;
-public sealed class MxAccessStaSession : IDisposable
+public sealed class MxAccessStaSession : IWorkerRuntimeSession
{
private readonly IMxAccessComObjectFactory factory;
private readonly IMxAccessEventSink eventSink;
@@ -98,6 +98,30 @@ public sealed class MxAccessStaSession : IDisposable
return commandDispatcher.DispatchAsync(command);
}
+ public WorkerRuntimeHeartbeatSnapshot CaptureHeartbeat()
+ {
+ uint pendingCommandCount = 0;
+ string currentCommandCorrelationId = string.Empty;
+
+ if (commandDispatcher is not null)
+ {
+ pendingCommandCount = (uint)commandDispatcher.PendingCommandCount;
+ currentCommandCorrelationId = commandDispatcher.CurrentCommandCorrelationId;
+ }
+
+ return new WorkerRuntimeHeartbeatSnapshot(
+ staRuntime.LastActivityUtc,
+ pendingCommandCount,
+ (uint)eventQueue.Count,
+ eventQueue.LastEventSequence,
+ currentCommandCorrelationId);
+ }
+
+ public void RequestShutdown()
+ {
+ commandDispatcher?.RequestShutdown();
+ }
+
public IReadOnlyList DrainEvents(uint maxEvents)
{
return eventQueue.Drain(maxEvents);
@@ -204,7 +228,7 @@ public sealed class MxAccessStaSession : IDisposable
return;
}
- commandDispatcher?.RequestShutdown();
+ RequestShutdown();
if (session is not null)
{
diff --git a/src/MxGateway.Worker/MxAccess/WorkerRuntimeHeartbeatSnapshot.cs b/src/MxGateway.Worker/MxAccess/WorkerRuntimeHeartbeatSnapshot.cs
new file mode 100644
index 0000000..cb4eba5
--- /dev/null
+++ b/src/MxGateway.Worker/MxAccess/WorkerRuntimeHeartbeatSnapshot.cs
@@ -0,0 +1,30 @@
+using System;
+
+namespace MxGateway.Worker.MxAccess;
+
+public sealed class WorkerRuntimeHeartbeatSnapshot
+{
+ public WorkerRuntimeHeartbeatSnapshot(
+ DateTimeOffset lastStaActivityUtc,
+ uint pendingCommandCount,
+ uint outboundEventQueueDepth,
+ ulong lastEventSequence,
+ string currentCommandCorrelationId)
+ {
+ LastStaActivityUtc = lastStaActivityUtc;
+ PendingCommandCount = pendingCommandCount;
+ OutboundEventQueueDepth = outboundEventQueueDepth;
+ LastEventSequence = lastEventSequence;
+ CurrentCommandCorrelationId = currentCommandCorrelationId ?? string.Empty;
+ }
+
+ public DateTimeOffset LastStaActivityUtc { get; }
+
+ public uint PendingCommandCount { get; }
+
+ public uint OutboundEventQueueDepth { get; }
+
+ public ulong LastEventSequence { get; }
+
+ public string CurrentCommandCorrelationId { get; }
+}
diff --git a/src/MxGateway.Worker/WorkerApplication.cs b/src/MxGateway.Worker/WorkerApplication.cs
index ec73acb..db4bc4b 100644
--- a/src/MxGateway.Worker/WorkerApplication.cs
+++ b/src/MxGateway.Worker/WorkerApplication.cs
@@ -83,7 +83,7 @@ public static class WorkerApplication
pipeClient.RunAsync(options).GetAwaiter().GetResult();
- logger.Information("WorkerPipeHandshakeSucceeded", new Dictionary
+ logger.Information("WorkerPipeSessionCompleted", new Dictionary
{
["session_id"] = options.SessionId,
["pipe_name"] = options.PipeName,