Table of Contents

Class ApiEndpoint

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

Configuration constants for the gateway's gRPC endpoint that other services call. The endpoint is configured via HostEnvVar and PortEnvVar, with defaults suitable for local development.

public static class ApiEndpoint
Inheritance
ApiEndpoint
Inherited Members

Fields

ApiKeyEnvVar

Environment variable carrying this service's own x-api-key for calling the gateway. Unset or empty sends no key: correct when the gateway's auth is disabled (no keys configured on it).

public const string ApiKeyEnvVar = "VIRTUFIN_API_KEY"

Field Value

string

DefaultHost

Default API host (loopback for local dev).

public const string DefaultHost = "localhost"

Field Value

string

DefaultPort

Default API gRPC port.

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)

The plaintext gRPC channel address http://{host}:{port}.

public static string BuildAddress(string host, int port)

Parameters

host string
port int

Returns

string