recoveryhost

package
v0.0.53 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: Apache-2.0 Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package recoveryhost contains offline fixtures for command-root recovery proofs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertLog

func AssertLog(t *testing.T, logs string)

AssertLog requires the wrapper's real successful-recovery record.

func ChildArgs

func ChildArgs(t *testing.T) ([]string, bool)

ChildArgs lets the SAME test enter its real command root in the subprocess. A read-only stderr file deterministically fails writes (portable EBADF).

func Command

func Command(t *testing.T, root, mode string, args []string) *exec.Cmd

Command uses only explicit fixture environment, never inherited provider auth.

func Daemon

func Daemon(t *testing.T, extra []string)

Daemon drives the actual command run/serve path in a child process. No logger is injected; the command chooses stderr and its operational logger itself.

func DaemonShutdown

func DaemonShutdown(t *testing.T, extra []string)

DaemonShutdown proves the actual command process cancels an established recovery probe and that a fresh process sharing its store stays idle.

Types

type Fixture

type Fixture struct {
	Server *httptest.Server
	Calls  atomic.Int32
}

Fixture serves one actual failed inference followed by one clean stream. Model discovery is also confined to this HTTP server.

func New

func New(t *testing.T) *Fixture

New starts a loopback-only inference fixture owned by t.

func (*Fixture) Flags

func (f *Fixture) Flags() []string

Flags selects the offline endpoint and a two-call recovery policy.

type ShutdownFixture

type ShutdownFixture struct {
	Server  *httptest.Server
	Calls   atomic.Int32
	Probe   chan struct{}
	Stopped chan struct{}
}

ShutdownFixture serves a failed request followed by a probe that remains active until its request is canceled.

Jump to

Keyboard shortcuts

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