Skip to Content
Server Setup & Diagnostics Boundary

Server Setup & Diagnostics Boundary

Unlike the Dart SDK, kalam-client exposes optional server diagnostics and bootstrap helpers behind Cargo features. They are not enabled in the default native-sdk install.

Default app surface

With default features, a typical Rust app uses:

  • execute_query / execute_with_files for SQL
  • live / live_events for realtime
  • login / refresh_access_token for auth (via auth-flows in native-sdk)
  • client.consumer() when the consumer feature is enabled

Health, setup, and cluster helpers are opt-in.

Health check (healthcheck feature)

TOML
kalam-client = { version = "0.5", features = ["native-sdk", "healthcheck"] }
RUST
let health = client.health_check().await?;println!("{:?}", health);

Calls GET /v1/api/healthcheck. Responses are cached briefly inside the client to avoid hammering the endpoint.

For a one-off check without the feature, use curl http://localhost:2900/health or execute_query("SELECT 1", ...).

Cluster health (cluster feature)

TOML
kalam-client = { version = "0.5", features = ["native-sdk", "cluster"] }
RUST
let cluster = client.cluster_health_check().await?;

Calls GET /v1/api/cluster/health for per-node runtime metrics. Intended for operators and admin tooling — often localhost-restricted.

First-run setup (setup feature)

TOML
kalam-client = { version = "0.5", features = ["native-sdk", "setup"] }
RUST
let status = client.check_setup_status().await?;if status.needs_setup {    let response = client.server_setup(server_setup_request).await?;}
MethodEndpoint
check_setup_status()GET /v1/api/auth/status
server_setup(request)POST /v1/api/auth/setup

login returns KalamLinkError::SetupRequired (HTTP 428) when the server still needs initial configuration.

For most deployments, use documented server flows instead of embedding setup in app code:

CLI-oriented bundle

native-full enables healthcheck, setup, cluster, consumer, and file-uploads together — useful for internal tools, not typical production microservices.

TOML
kalam-client = { version = "0.5", features = ["native-full"] }

What stays outside the SDK

  • Database schema design and migrations
  • Admin UI operations
  • Server process management and deployment

Use the HTTP API Reference for protocol details.

Next

Last updated on