devhost

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: Apache-2.0 Imports: 15 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 devhost is a development overlay host for bdns: bdns's module with an overlay engine's part played over HTTP and everything kept in memory. A submission goes through its topic's manager, the admitted outputs are stored and handed to the lookup service, and a lookup's outpoints are answered with their stored BEEF. It carries every zone it is sent a record of, with no operator's list of topics, no persistence, no peers and no access control: it is for trying bdns on one machine, never for a network. A real host is an overlay engine that mounts package module.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Host

type Host struct {
	// contains filtered or unexported fields
}

Host is the development host. Make one with New and serve it: it answers POST /submit (the topic in the x-topics header, the BEEF as the body) and POST /lookup as an overlay engine does, and GET /healthz.

func New

func New(hdrs chaintracker.ChainTracker, now func() time.Time, logf func(format string, args ...any)) (*Host, error)

New is a host that checks proofs against hdrs. logf, when not nil, receives the module's log lines.

func (*Host) DeleteOutput

func (h *Host) DeleteOutput(_ context.Context, op *transaction.Outpoint, _ string) error

DeleteOutput implements the storage a service evicts a replaced or expired carrier from.

func (*Host) FindOutput

func (h *Host) FindOutput(_ context.Context, op *transaction.Outpoint, topic string) (*bmodule.Output, error)

FindOutput implements module.RestoreStorage.

func (*Host) Prune

func (h *Host) Prune()

Prune drops what has expired, as an engine's timer does.

func (*Host) ServeHTTP

func (h *Host) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP answers /submit, /lookup and /healthz.

Jump to

Keyboard shortcuts

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