config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 9 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 config reads the host's configuration from the environment. The names follow the TypeScript host's (OVERLAY_*) wherever the meaning is the same, so one EnvironmentFile reads the same to an operator on either host. It refuses rather than guesses: a malformed value stops the host before the port opens.

Index

Constants

View Source
const (
	GenesisMain = "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f"
	GenesisTest = "000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943"
)

Genesis block hashes of the networks the scope can default.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Listen string
	Port   int
	// Topics the host carries (OVERLAY_TOPICS).
	Topics []string
	// Modules mounted, by registered name (OVERLAY_MODULES, default anytx).
	Modules []string

	MongoURI      string
	MongoDatabase string
	// MongoLease is how long an unresolved admission attempt holds its
	// operation before reconciliation may fence it aborted; 0 is upstream's
	// default (2 min). It must exceed the store's transaction plus commit
	// timeouts (30 s).
	MongoLease time.Duration

	// ChainTrackerURL is the overlay-bridge header API origin.
	ChainTrackerURL string
	// Network selects pkg/spv's activation heights and names the storage scope.
	Network     spv.Network
	GenesisHash string
	NodeID      string

	Finality       spv.FinalityPolicy
	VerifyTimeout  time.Duration
	MinFeeSatPerKB uint64

	ReconcileDepth uint32
	ReconcileEvery time.Duration
}

Config is the host's whole configuration.

func Load

func Load() (*Config, error)

Load reads the environment.

type Error

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

Error is a configuration error.

func (*Error) Error

func (e *Error) Error() string

Jump to

Keyboard shortcuts

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