Namespace Virtufin.Api.Client
Classes
- ApiClient
Client for the Virtufin API Gateway: dynamic per-service RPC dispatch (service names as dynamic members, e.g.
client.workmanager.SomeMethod()), plus direct methods for state, pub/sub, triggers and config.
- ApiEndpoint
Configuration constants for the virtufin-api gRPC endpoint that other services call. The endpoint is configured via env vars (HostEnvVar and PortEnvVar) with defaults suitable for local development.
- CloudEvents
Constants for CloudEvents v1.0 metadata keys and standard values. Used by services that publish lifecycle events to the virtufin-api via
Pubsub.PublishEventwith the per-service topic name from the publishing service'sConfiguration/Topics.cs. All values are spelled per the CloudEvents v1.0 spec (https://github.com/cloudevents/spec/blob/v1.0/spec.md).
- ServiceClient
Dynamic client for invoking methods on a specific service through the gateway. Allows syntax like:
client.workmanager.SomeMethod().RPC method names are accessed as dynamic members. Each member returns a
Func<Dictionary, Task<Dictionary>>that invokes the method via the Gateway's InvokeJson RPC.ServiceClient instances are created by TryGetMember(GetMemberBinder, out object?) (i.e.
client.workmanager) and cached per service name.
- StreamEventHandler
Handles stream events with callback methods.
Interfaces
- IAsyncStreamEventHandler
Async callback interface for receiving stream events. Handlers that implement this interface are awaited by SubscribeAsync(IStreamEventHandler, IEnumerable<string>?, CancellationToken), preventing slow handlers from causing gRPC stream backpressure.
- IStreamEventHandler
Callback interface for receiving stream events.