Table of Contents

Class ApiEndpoint

Namespace
Virtufin.Api.Client
Assembly
Virtufin.Api.Client.dll

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.

public static class ApiEndpoint
Inheritance
ApiEndpoint
Inherited Members

Fields

DefaultHost

Default API host (loopback for local dev).

public const string DefaultHost = "localhost"

Field Value

string

DefaultPort

Default API gRPC port. Matches the API's PortConstants.DefaultGrpcPort.

public const int DefaultPort = 5002

Field Value

int

HostEnvVar

Environment variable that overrides the API host.

public const string HostEnvVar = "VIRTUFIN_API_HOST"

Field Value

string

PortEnvVar

Environment variable that overrides the API gRPC port.

public const string PortEnvVar = "VIRTUFIN_API_GRPC_PORT"

Field Value

string

Methods

BuildAddress(string, int)

Build the gRPC channel address from a host and port. Returns http://{host}:{port} (plaintext; mTLS is handled at the channel/CallCredentials layer if needed).

public static string BuildAddress(string host, int port)

Parameters

host string
port int

Returns

string