visor

command module
v1.108.33 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

README

Hanzo Visor

The multi-cloud compute plane for Hanzo Cloud — machines, GPUs, and clusters across AWS, GCP, Azure, DigitalOcean, and bare metal.

Go 1.24 Compute License

Hanzo Visor manages physical, virtual, and containerized compute across multiple cloud providers. It allows tenants to launch, resize, and terminate machines, configure GPU accelerators, attach block storage, and connect BYO Kubernetes clusters under one unified API (api.hanzo.ai/v1/visor/*) and console interface.

Features

  • Multi-Cloud Compute Passthrough — Native drivers for AWS EC2, Google Compute Engine, Azure Virtual Machines, DigitalOcean Droplets, and Hetzner.
  • BYO Kubernetes Clusters — Attach external clusters via KMS-sealed kubeconfig credentials into the unified fleet.
  • Unified Identity & Access — Tenant isolation and user authentication powered by Hanzo IAM (hanzo.id).
  • Integrated Metering & Spend Caps — Real-time compute usage attribution (hanzo.compute_usage) and billing gates integrated with Hanzo Commerce.
  • Block Storage Orchestration — Dynamic provisioning, resizing, snapshotting, and attaching of cloud block volumes.

Architecture

Visor acts as the compute engine behind the unified Hanzo Cloud binary:

                  ┌──────────────────────┐
                  │    console.hanzo.ai  │
                  └──────────┬───────────┘
                             │
                             ▼
                  ┌──────────────────────┐
                  │     Hanzo Cloud      │
                  │  (/v1/visor/clusters)│
                  └──────────┬───────────┘
                             │
                             ▼
                  ┌──────────────────────┐
                  │     Hanzo Visor      │
                  │    (Compute Plane)   │
                  └──────────┬───────────┘
         ┌────────────┬──────┴───────┬────────────┐
         ▼            ▼              ▼            ▼
     ┌───────┐   ┌─────────┐   ┌───────────┐  ┌───────┐
     │  AWS  │   │   GCP   │   │   Azure   │  │  DO   │
     │ (EC2) │   │  (GCE)  │   │   (VMs)   │  │(DOKS) │
     └───────┘   └─────────┘   └───────────┘  └───────┘

API Surface

Endpoint Method Description
/v1/visor/clusters GET List managed and attached BYO clusters
/v1/visor/clusters POST Attach a BYO cluster with sealed kubeconfig
/v1/visor/clusters/:id DELETE Detach a BYO cluster from the fleet
/v1/visor/machines GET List active virtual machines and instances
/v1/visor/machines POST Launch an instance in a selected cloud and region
/v1/visor/machines/:id DELETE Terminate an instance
/v1/visor/volumes GET List block storage volumes
/v1/visor/volumes POST Create or attach a storage volume

License

Apache-2.0. See NOTICE for third-party attributions.

Documentation

Overview

Command visor is the Hanzo Visor cloud compute/VM/GPU management service: zip-native on the hanzoai/orm store. It serves two addresses — the HTTP edge the ingress reaches, and the canonical ZAP socket the rest of the fleet dials it by name on.

Run it with no arguments to serve (the container contract); `visor version` prints the build version.

Directories

Path Synopsis
fleet.go is the fleet-billing orchestrator — the ONE place the three connected- compute tiers are metered, all through the canonical commerce/metering path (service.NewMeteringClient), per org+project, so a customer sees ONE invoice however their compute is connected:
fleet.go is the fleet-billing orchestrator — the ONE place the three connected- compute tiers are metered, all through the canonical commerce/metering path (service.NewMeteringClient), per org+project, so a customer sees ONE invoice however their compute is connected:
validator.go reads the hanzo.network (the Hanzo EVM) mainnet validator set — the source of truth for the FREE fleet-billing tier.
validator.go reads the hanzo.network (the Hanzo EVM) mainnet validator set — the source of truth for the FREE fleet-billing tier.
Package conf is visor's ONE configuration reader.
Package conf is visor's ONE configuration reader.
compute.go is the canonical /v1 resell compute surface: the cached DigitalOcean catalog (regions/sizes/GPUs, resale-priced) and per-org machine operations backed by the configured cloud account.
compute.go is the canonical /v1 resell compute surface: the cached DigitalOcean catalog (regions/sizes/GPUs, resale-priced) and per-org machine operations backed by the configured cloud account.
Package logs writes visor's leveled log lines.
Package logs writes visor's leveled log lines.
tenant_context.go is the ONE source of truth for the tenant-hierarchy request scope (org > app > project, plus tenant/actor/env).
tenant_context.go is the ONE source of truth for the tenant-hierarchy request scope (org > app > project, plus tenant/actor/env).
pkg
visor
Package visor exposes visor's in-process bootstrap so a parent binary (github.com/hanzoai/cloud) can mount visor's /v1 surface in the same address space — the same routers, controllers and filters the standalone server runs, minus the listener.
Package visor exposes visor's in-process bootstrap so a parent binary (github.com/hanzoai/cloud) can mount visor's /v1 surface in the same address space — the same routers, controllers and filters the standalone server runs, minus the listener.
analytics.go is the ONE path by which visor rolls compute fleet/spend events into hanzoai/datastore (hanzo.compute_usage, ClickHouse) — the ANALYTICAL plane that mirrors, but is orthogonal to, the OPERATIONAL commerce ledger (tenant-data-hierarchy HIP).
analytics.go is the ONE path by which visor rolls compute fleet/spend events into hanzoai/datastore (hanzo.compute_usage, ClickHouse) — the ANALYTICAL plane that mirrors, but is orthogonal to, the OPERATIONAL commerce ledger (tenant-data-hierarchy HIP).
instrument.go is the small, typed instrumentation API the rest of visor calls.
instrument.go is the small, typed instrumentation API the rest of visor calls.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL