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 ¶
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.