host

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 26 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 host wires the whole Go overlay host: storage, chain tracker, modules, the engine, the pipeline, readiness, root reconciliation, retention, GASP catch-up and the HTTP surface. The binary and the integration test both build it here, so the test exercises exactly what runs.

Index

Constants

This section is empty.

Variables

View Source
var ErrAssert = errors.New("startup assertion failed")

ErrAssert is a startup assertion that failed: a misconfiguration.

Functions

This section is empty.

Types

type Host

type Host struct {
	Handler  http.Handler
	Engine   *engine.Engine
	Store    *store.Store
	Pipeline *pipeline.Pipeline
	Metrics  *metrics.Metrics
	Tracker  *tracker.Bridge
	// Syncer is the GASP catch-up (internal/catchup); it pulls only with
	// peers configured.
	Syncer *catchup.Syncer
	// Gate is the catch-up hold (nil when off: no OVERLAY_GASP_SHED_URL,
	// no peers, or OVERLAY_CATCHUP_HOLD=false).
	Gate *catchup.Gate
	// contains filtered or unexported fields
}

Host is one running overlay host.

func New

func New(ctx context.Context, cfg *config.Config, version string, log *slog.Logger) (*Host, error)

New builds a host. It opens storage; Close releases it.

func (*Host) Checkpoint added in v0.2.0

func (h *Host) Checkpoint(ctx context.Context, name string, blobs bool) (store.CheckpointResult, error)

Checkpoint writes a checkpoint under the configured backup directory as <dir>/<name> (name is one path component): the index and every module state directory at one instant, admissions held for it, and with blobs the blob snapshot.

func (*Host) Close

func (h *Host) Close(context.Context) error

Close stops the modules' background work, waiting for it (at most 10 s) so that none of it reaches the storage after, and releases storage.

func (*Host) Probe

func (h *Host) Probe(ctx context.Context) bool

Probe re-checks readiness: storage and the chain tracker both answer.

func (*Host) Ready

func (h *Host) Ready() bool

Ready reports the last readiness probe.

func (*Host) Reconcile

func (h *Host) Reconcile(ctx context.Context) error

Reconcile runs one root reconciliation pass now.

func (*Host) Start

func (h *Host) Start(ctx context.Context)

Start runs readiness probing, root reconciliation, retention and GASP catch-up until ctx ends.

Jump to

Keyboard shortcuts

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