visor

package
v1.108.24 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 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

View Source
const Name = "visor"

Name is what visor is called on the fleet, stated once. It is the app name zip serves under AND the name its canonical socket is derived from (zip.SocketPath(Name)), because those are the same fact: a caller reaches a peer BY NAME, so a second spelling of the name is a peer that cannot be found.

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