Status information for health checks and service monitoring.
Remarks
Used to report the health status of various SDK components including
storage providers, RPC connections, and personal servers. The details
field can contain provider-specific information for debugging.
Timestamps use Unix epoch milliseconds.
Example
// Checking storage provider health conststatus: StatusInfo = awaitstorage.getStatus();
if (!status.healthy) { console.error(`Storage unhealthy: ${status.message}`); // Check how long the issue has persisted constdowntime = Date.now() - status.lastCheck; if (downtime > 300000) { // 5 minutes // Switch to backup provider } }
// Detailed status with custom fields constserverStatus: StatusInfo = { healthy:true, message:'All systems operational', lastCheck:Date.now(), details: { uptime:3600000, // 1 hour requestsServed:1234, avgResponseTime:145, // ms activeConnections:23 } };
Status information for health checks and service monitoring.
Remarks
Used to report the health status of various SDK components including storage providers, RPC connections, and personal servers. The details field can contain provider-specific information for debugging. Timestamps use Unix epoch milliseconds.
Example