visor

package
v1.108.21 Latest Latest
Warning

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

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

Documentation

Overview

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.

There is ONE boot path. Both cmd main() and the embedded cloud mount call Bootstrap; the only difference is who owns the listener (main.go calls app.Listen; the cloud mount serves Handler() behind its own listener).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bootstrap

func Bootstrap() *zip.App

Bootstrap runs visor's full in-process initialization and returns the wired zip App — the ONE boot path. The caller owns the listener: cmd main() calls app.Listen; the embedded cloud mount serves Handler().

func Handler

func Handler() (h http.Handler, err error)

Handler boots visor in-process and returns its HTTP handler for a parent binary to mount behind its own listener. Any panic from the underlying boot is recovered and returned as an error so a parent's mount fails cleanly (fail-closed) rather than crashing the whole process.

Types

This section is empty.

Jump to

Keyboard shortcuts

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