feat: expose mapped raw and uns data through grpc adapters

This commit is contained in:
Joseph Doherty
2026-11-16 20:43:15 -05:00
parent 47960a6d57
commit 8ad03e9c5d
118 changed files with 12645 additions and 227 deletions
@@ -467,10 +467,17 @@ public sealed class DataConnectionDeploymentLease : IDataConnection, IDisposable
public async Task<IDataSubscription> SubscribeAsync(CancellationToken cancellationToken)
{
Check(DataOperations.Subscribe); var stream = await _inner.SubscribeAsync(cancellationToken).ConfigureAwait(false);
try { Check(DataOperations.Subscribe); return new ScopedSubscription(this, stream); }
try { Check(DataOperations.Subscribe); return stream is IDataSubscriptionProvenance provenance
? new ProvenancedScopedSubscription(this, stream, provenance.Serving)
: new ScopedSubscription(this, stream); }
catch { await stream.DisposeAsync().ConfigureAwait(false); throw; }
}
private sealed class ScopedSubscription(DataConnectionDeploymentLease owner, IDataSubscription inner) : IDataSubscription
private sealed class ProvenancedScopedSubscription(DataConnectionDeploymentLease owner, IDataSubscription inner, ServingIdentity serving)
: ScopedSubscription(owner, inner), IDataSubscriptionProvenance
{
public ServingIdentity Serving { get; } = serving;
}
private class ScopedSubscription(DataConnectionDeploymentLease owner, IDataSubscription inner) : IDataSubscription
{
public Task SendAsync(DataSubscriptionCommand command, CancellationToken cancellationToken)
{