Skip to main content

Crate kalam_client

Crate kalam_client 

Source
Expand description

App-facing KalamDB client crate.

This is the preferred Rust client surface for applications. It wraps the shared link-common implementation with lighter default features than the full compatibility surface that previously lived at the root of link/.

Modules§

auth
Authentication provider and models for KalamDB client.
client
Main KalamDB client with builder pattern.
compression
WebSocket message decompression utilities
credentials
Credential storage abstraction for KalamDB clients.
error
Error types for KalamDB SDK client operations.
event_handlers
Connection lifecycle event handlers for KalamDB client.
models
Data models shared by the KalamDB SDK.
query
SQL query execution with HTTP transport.
seq_tracking
Sequence ID tracking helpers for subscriptions.
subscription
WebSocket subscription management for real-time updates.
timeouts
Timeout configuration for KalamDB client operations.
timestamp
Timestamp formatting utilities for KalamDB.

Structs§

ClusterHealthResponse
Cluster health response from the server.
ClusterNodeHealth
Per-node health details from the cluster health endpoint.
ConnectionError
Error information passed to the on_error handler.
ConnectionOptions
Connection-level options for the WebSocket/HTTP client.
Credentials
Stored credentials for a KalamDB instance.
DisconnectReason
Reason for a disconnect event.
ErrorDetail
Error details for failed SQL execution
EventHandlers
Connection lifecycle event handlers.
FileRef
File reference stored as JSON in FILE columns.
HealthCheckResponse
Health check response from the server.
KalamCellValue
A single cell value in a query result row or subscription notification.
KalamLinkClient
Main KalamDB client.
KalamLinkTimeouts
Timeout configuration for KalamDB client operations.
KalamLinkTimeoutsBuilder
Builder for creating custom KalamLinkTimeouts configurations.
LiveRowsConfig
Configuration for live-query row materialization.
LiveRowsMaterializer
Stateful reducer that materializes the current row set from change events.
LiveRowsSubscription
High-level subscription that yields materialized live-query row snapshots.
LoginRequest
Login request body for authentication
LoginResponse
Login response from the server
LoginUserInfo
User information returned in login response
MemoryCredentialStore
In-memory credential store for testing and temporary use.
QueryExecutor
Handles SQL query execution via HTTP.
QueryRequest
Request payload for SQL query execution.
QueryResponse
Contains query results, execution metadata, and optional error information. Matches the server’s SqlResponse structure.
QueryResult
Individual query result within a SQL response.
SchemaField
A field in the result schema returned by SQL queries
SeqId
Sequence ID for MVCC versioning
ServerSetupRequest
Server setup request body
ServerSetupResponse
Server setup response body
SetupStatusResponse
Server setup status response
SetupUserInfo
User info returned in setup response
SqlSubscriptionDescriptor
Nested subscription metadata returned by SUBSCRIBE TO over SQL HTTP.
SqlSubscriptionRow
Single-row payload returned for SUBSCRIBE TO via /v1/api/sql.
SubscriptionConfig
Configuration for establishing a WebSocket subscription.
SubscriptionInfo
Read-only snapshot of an active subscription’s metadata.
SubscriptionManager
Manages WebSocket subscriptions for real-time change notifications.
SubscriptionOptions
Options for live query subscriptions.
TimestampFormatter
Timestamp formatter for converting millisecond timestamps to strings.
UploadProgress
Upload progress information for a single file.
UserId
Type-safe wrapper for user identifiers.

Enums§

AuthProvider
Authentication credentials for KalamDB server.
ChangeEvent
Change event received via WebSocket subscription.
FieldFlag
HttpVersion
HTTP protocol version to use for connections.
KalamDataType
Unified data type enum with wire format tags
KalamLinkError
Errors that can occur during KalamDB SDK operations.
LiveRowsEvent
High-level event emitted by a materialized live-query subscription.
MessageDirection
Direction of a message (for on_receive / on_send debug hooks).
ResolvedAuth
Resolves the effective AuthProvider for a connection.
Role
Enum representing user roles in KalamDB.
SqlSubscriptionStatus
Status values returned by SUBSCRIBE TO over the SQL HTTP API.
TimestampFormat
Timestamp format options.

Constants§

VERSION

Traits§

CredentialStore
Trait for credential storage backends.
DynamicAuthProvider
Async authentication provider called on every connect or reconnect.

Functions§

now
Get current timestamp in milliseconds (compatible with KalamDB).
parse_i64
Parse an i64 from a KalamCellValue that might be a Number or a String.
parse_iso8601
Parse ISO 8601 string back to milliseconds.

Type Aliases§

ArcDynAuthProvider
A boxed, reference-counted DynamicAuthProvider.
AuthRefreshCallback
Async callback that resolves fresh AuthProvider credentials.
FieldFlags
QueryUploadFile
Borrowed file upload tuple used by query helpers.
Result
Result type alias using KalamLinkError
RowData
Type alias for a subscription row — named columns.
UploadProgressCallback
Progress callback for multipart file uploads.