Skip to content

Configuration

Client configuration values and config-file helpers.

Selects the API endpoint, credentials, config file, and request timeout.

interface RuntaConfig
Name Type Description
configPath? string Configuration file path.
endpoint? string Resolved Runta API endpoint.
fetch? (input: URL | RequestInfo, init?: RequestInit) => Promise<Response> Custom Fetch implementation.
timeoutMs? number Request timeout in milliseconds.
token? string Bearer token used for authentication.
userAgent? string User-Agent header sent with requests.

Default Runta control-plane endpoint.

const DEFAULT_ENDPOINT: "https://api.runta.me"

Reads endpoint and token values from the Runta TOML config file.

function readRuntaConfig(configPath?: string): { endpoint?: string; token?: string }
Name Type Default Description
configPath? string Optional Path to the Runta TOML configuration file.
  • { endpoint?: string; token?: string }

Resolves explicit, environment, and config-file client settings.

function resolveConfig(input: { configPath?: string; endpoint?: string; token?: string }): ResolvedConfig
Name Type Default Description
input { configPath?: string; endpoint?: string; token?: string } Required Explicit client configuration values.
  • ResolvedConfig