Core utilities and configuration for selva-compute
This module provides the foundational building blocks for the library, including:
import { fetchRhinoCompute, RhinoComputeError } from 'selva-compute/core';try { const data = await fetchRhinoCompute('rhino/health', null, config); console.log('Server is healthy:', data);} catch (error) { if (error instanceof RhinoComputeError) { console.error(`API Error [${error.code}]: ${error.message}`); }} Copy
import { fetchRhinoCompute, RhinoComputeError } from 'selva-compute/core';try { const data = await fetchRhinoCompute('rhino/health', null, config); console.log('Server is healthy:', data);} catch (error) { if (error instanceof RhinoComputeError) { console.error(`API Error [${error.code}]: ${error.message}`); }}
import { ComputeServerStats } from 'selva-compute/core';const stats = new ComputeServerStats(serverUrl, apiKey);if (await stats.isServerOnline()) { const info = await stats.getServerStats(); console.log(`Compute Version: ${info.version}`);}await stats.dispose(); Copy
import { ComputeServerStats } from 'selva-compute/core';const stats = new ComputeServerStats(serverUrl, apiKey);if (await stats.isServerOnline()) { const info = await stats.getServerStats(); console.log(`Compute Version: ${info.version}`);}await stats.dispose();
Core utilities and configuration for selva-compute
This module provides the foundational building blocks for the library, including:
Example: Performing a low-level compute request
Example: Monitoring server status