feat(grpc-data): H2 origin HistoryRead ingress, header gating, LocalDataConnection history
Service: HistoryRead rpc; history (field 16, Metadata.history, bit 32) emitted only on a call whose header requested history AND whose origin can serve it, otherwise stripped to the v1 shape; un-negotiated HistoryRead is FAILED_PRECONDITION. Origin: Implemented(target) grows by HistoryRead when a historian backend is configured; per-item gate catalog -> export grant + origin ACL HistoryRead -> tagname, every refusal the same BadHistoryOperationUnsupported; per-principal admission (BadTooManyOperations), per-page ceiling, response-byte chunking with single-use chunk tokens; one session per (principal, credential, HTTP/2 connection) cleared on close; wiring faults BadInternalError + error log; caller cancel never a backend outcome. DataOperationPolicy maps HistoryRead.
This commit is contained in:
@@ -17,7 +17,8 @@ public sealed class LocalDataRuntimeComposition : IDisposable
|
||||
private int _disposed;
|
||||
public LocalDataRuntimeComposition(LocalCatalogCoordinator catalog, PartitionedSampleHub hub,
|
||||
DataOperationPolicy policy, DataCapabilitiesProvider capabilities, TimeProvider clock, DataWriteRuntime writes,
|
||||
IActorRef host, SubscriptionAcquisitionCapacity acquisitionCapacity, LocalDataRuntimeLimits limits)
|
||||
IActorRef host, SubscriptionAcquisitionCapacity acquisitionCapacity, LocalDataRuntimeLimits limits,
|
||||
ZB.MOM.WW.OtOpcUa.OpcUaServer.IOriginHistoryPort? history = null, Microsoft.Extensions.Logging.ILogger? logger = null)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(catalog); ArgumentNullException.ThrowIfNull(hub);
|
||||
ArgumentNullException.ThrowIfNull(policy); ArgumentNullException.ThrowIfNull(capabilities);
|
||||
@@ -36,7 +37,8 @@ public sealed class LocalDataRuntimeComposition : IDisposable
|
||||
services = new LocalDataServices(() => catalog.Current, hub, policy, capabilities, clock,
|
||||
writes: context => writes.ForCaller(context, () => host),
|
||||
targetSubscriptions: (context, target) => new LocalSubscriptionService(services!, context, target, _demand, sessionLimits, capacity),
|
||||
subscriptionFreshnessChallenges: true);
|
||||
subscriptionFreshnessChallenges: true, history: history)
|
||||
{ Logger = logger ?? Microsoft.Extensions.Logging.Abstractions.NullLogger.Instance };
|
||||
Services = services;
|
||||
}
|
||||
public LocalDataServices Services { get; }
|
||||
|
||||
Reference in New Issue
Block a user