Namespace Virtufin.Api.Services
Classes
- AggregatedReflectionResolver
Resolves gRPC server reflection requests against two descriptor sources: the gateway's own compiled-in protos (Gateway/Config/State/Pubsub) and the backend descriptor caches maintained by GrpcReflectionService. This is what lets clients reflect on backend services (virtufin.WorkManager, virtufin.WebSocketManager, ...) through the gateway, which does not compile their protos in. Besides fully-qualified symbols, the registered service name from services.json (e.g. "workmanager") is accepted as a FileContainingSymbol alias for the backend's whole descriptor set.
- AggregatedReflectionService
grpc.reflection.v1alpha.ServerReflection endpoint backed by AggregatedReflectionResolver. The Python client and the TUI speak this version.
- AggregatedReflectionV1Service
grpc.reflection.v1.ServerReflection endpoint backed by AggregatedReflectionResolver. Modern tooling (grpcurl) and the gateway's own backend-facing client speak this version.
- ConfigService
Implementation of the gRPC Config service. Provides service configuration discovery and management capabilities.
- DaprStableJobCallbackMethodProvider
Serves the Dapr scheduler's job callback on its stable route,
/dapr.proto.runtime.v1.AppCallback/OnJobEvent.Why this exists: the Dapr runtime (confirmed on 1.18.1) delivers scheduled jobs to
AppCallback/OnJobEvent— the stable service, per dapr/dapr's ownappcallback.proto. The .NET SDK lags it: the generated code inDapr.Protos1.18.2 containsOnJobEventAlpha1onAppCallbackAlphaand noOnJobEventanywhere, so DaprAppCallbackService could only ever bind the alpha route. Nothing served the route Dapr actually calls, the request matched no endpoint, and it was rejected 401 byApiKeyHttpMiddleware(which exempts only requests whose matched endpoint carriesGrpcMethodMetadata). Net effect: **no scheduled trigger ever fired**, while Dapr retried roughly once a second forever.Registering the method here rather than regenerating
appcallback.protointo this repo is deliberate: the request and response types already exist inDapr.Protosand are reused as-is, so there is no second copy of the Dapr message types to collide with the SDK's (the CS0433 duplicate-type trap this codebase has hit before). Only the service/method *name* differs.Because the endpoint is produced through the normal gRPC service-model pipeline it carries
GrpcMethodMetadata, soApiKeyHttpMiddlewarelets it through toApiKeyInterceptor, which exempts the/dapr.proto.runtime.v1.AppCallback/prefix — the sidecar cannot present an API key.Both routes stay live: the alpha one for older runtimes, this one for current ones. They share a single handler, so behaviour cannot drift. Once the SDK generates the stable method, this provider can be replaced by a plain
override OnJobEventon DaprAppCallbackService.
- FieldSchema
Describes a single field within a message schema.
- GatewayService
Implementation of the gRPC Gateway service. Provides service discovery and method invocation. Event subscription (Gateway.Subscribe) was never added to gateway.proto -- Pubsub.Subscribe (see PubsubService) is the only subscribe path; this class previously held unused constructor dependencies (DaprPublishSubscribeClient, TopicDaprSubscriptionRegistry, GatewaySubscriptionManager) left over from that never-implemented design.
- GatewaySubscriptionManager
In-process broadcast broker for the
Gateway.SubscribeRPC. One broker per topic; multiple gRPC callers on the same topic all receive every message via BroadcastToTopicAsync(string, string, string, string, string, string, byte[], string, string, string).
- GrpcCallResult
Represents the result of a gRPC call invocation.
- GrpcReflectionService
Provides gRPC reflection functionality including service discovery, method schema retrieval, and dynamic gRPC invocation based on reflection data.
- MethodSchema
Describes the schema of a gRPC method's input or output type.
- OneofCaseSchema
Represents a case within a oneof field group.
- PubsubService
Implements the Pubsub gRPC service for publish/subscribe messaging via Dapr. Publish receives a CloudEvent proto; Subscribe streams reconstructed CloudEvents.
- ReflectionAnswer
Protocol-neutral result of a reflection lookup; adapted into the v1alpha/v1 response messages by the two service endpoints below. Exactly one of ServiceNames, FileDescriptorProtos, or ErrorMessage is set.
- ServiceMethodInfo
Represents a gRPC method with its metadata.
- SubscriptionHealthSweeperHostedService
Background service that periodically sweeps subscriptions and removes dead ones. Uses heartbeat writes to detect subscriptions whose clients have disconnected.
- SubscriptionManagerBase<TEvent, TSubscription>
Abstract base class for managing event subscriptions with health monitoring. Provides common subscription management, broadcasting, and cleanup functionality.
- TopicDaprSubscriptionRegistry
Manages one Dapr pubsub subscription per topic per API process, with a reference count of in-process gRPC callers sharing it.
Per the Pub/Sub Topics spec §Subscription Implementation Pattern: one Dapr subscription per topic per service process — NOT one per gRPC call. Per-call Dapr subscriptions would cause the same event to be load-balanced across callers instead of broadcast to each.
- TopicDaprSubscriptionRegistry.SubscriptionHandle
Per-caller handle. Disposing releases the caller's reference.