Selva Compute API Reference - v1.1.2
    Preparing search index...

    Module core

    Core utilities and configuration for selva-compute

    This module provides the foundational building blocks for the library, including:

    • Networking: Type-safe HTTP wrappers for the Rhino Compute API
    • Server Monitoring: Health checks and telemetry monitoring
    • Error Handling: Specialized error classes for API and network failures
    • Logging: Configurable debug and production logging
    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();

    Modules

    <internal>

    Classes

    ComputeServerStats
    RhinoComputeError

    Interfaces

    ComputeConfig
    Logger

    Type Aliases

    ErrorCode
    RhinoModelUnit

    Variables

    ErrorCodes

    Functions

    enableDebugLogging
    fetchRhinoCompute
    getLogger
    setLogger