openvibe-sdk/compute
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
From types/compute.d.ts (server only). Declarations are shown verbatim.
type Strategy
export type Strategy = 'automatic' | 'cheapest' | 'fastest' | 'private' | 'own';type Tier
export type Tier = 'own' | 'home' | 'dedicated' | 'community' | 'partner';interface Machine
export interface Machine { id: string; tier: Tier; owner?: string; health: string; draining?: boolean; region: string; hourly: number | null; currency: string; free_ram_mb: number; free_slots: number; gpu_mb?: number; latency_ms?: number; queue_ms?: number; sessions?: number; state?: string; managed?: boolean; idle_since?: number; egress?: string }interface Request
export interface Request { strategy?: Strategy; owner?: string; kind?: string; ram_mb?: number; gpu_mb?: number; region?: string; machine?: string; public_egress?: boolean; max_hourly?: number }interface Pool
export interface Pool { strategy?: Strategy; currency?: string; kind?: string; target_wait_ms?: number; max_hourly?: number; min_gain?: number; measured_peak_ram_mb?: number; min_warm?: number; max_machines?: number; slots_per_machine?: number; idle_grace_ms?: number }interface Decision
export interface Decision { strategy: Strategy; selected: string | null; tier: Tier | null; hourly: number | null; currency: string; reasons: string[]; rejected: Array<{id: string; reason: string}>; switched: boolean; decided_at: string }export export function choose(request: Request, machines: Machine[]
export function choose(request: Request, machines: Machine[], pool?: Pool, context?: {now?: number; current?: string | null}): Decision;export export function scale(pool: Pool, machines: Machine[], waiti
export function scale(pool: Pool, machines: Machine[], waiting: Array<{created_at: number}>, context?: {now?: number}): {actions: Array<{action: string; id?: string; reason: string}>; ram_per_session_mb: number; waiting: number; overdue: number; free_slots: number};export export function micros(value: string | number): bigint;
export function micros(value: string | number): bigint;export export function charge(hourlyMicros: bigint | string, millis
export function charge(hourlyMicros: bigint | string, milliseconds: number, quantumSeconds?: number): bigint;interface Quote
export interface Quote { provider: string; id: string; region: string; hourly: number | null; currency: string; ram_mb: number; gpu_mb: number; setup: number; billing_seconds: number; tier: Tier; quoted_at: number; expires_at: number; provisionable?: boolean; reason?: string }interface Provider
export interface Provider {id: string; configured: boolean; quote(request?: {gpu_mb?: number}): Promise<Quote[]>; provision(quote: Quote, spec: {label: string; image: string; command?: string[]; disk_gb?: number}): Promise<{id: string}>; health(id: string): Promise<{state?: string; deleted?: boolean}>; release(id: string): Promise<void>}export export function createProviders(options?: {fetch?: typeof fe
export function createProviders(options?: {fetch?: typeof fetch; config?: Record<string, {key?: string; application_secret?: string; consumer_key?: string; project?: string}>; now?: () => number}): Record<string, Provider>;export export const STRATEGIES: Strategy[];
export const STRATEGIES: Strategy[];export export const TIERS: Tier[];
export const TIERS: Tier[];