Discover Packages
github.com/marvell/sprut
internal
config
package
Version:
v0.1.0
Opens a new window with list of versions in this module.
Published: Oct 7, 2026
License: MIT
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package config turns a Config file into the Upstream definitions it declares.
Parse parses Config bytes into the Upstreams to start, in Config order,
plus warnings about the Config. lookupEnv resolves ${VAR} references.
Path resolves which Config file to read: flag (from -c/--config), then
$SPRUT_CONFIG, then $XDG_CONFIG_HOME/sprut/config.json, then
~/.config/sprut/config.json.
LookupEnv looks up an environment variable, like os.LookupEnv.
LookupIn returns a lookup over env, which is in os.Environ form. As with
a real environment, the last entry for a key wins.
Transport is how the Gateway talks to an Upstream.
Upstream is one resolved Upstream definition from the Config.
Warning is a problem in the Config that does not stop the Gateway.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.