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 ¶
- Variables
- type Host
- func (h *Host) Checkpoint(ctx context.Context, name string, blobs bool) (store.CheckpointResult, error)
- func (h *Host) Close(context.Context) error
- func (h *Host) Probe(ctx context.Context) bool
- func (h *Host) Ready() bool
- func (h *Host) Reconcile(ctx context.Context) error
- func (h *Host) Start(ctx context.Context)
Constants ¶
This section is empty.
Variables ¶
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 (*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 ¶
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.