Documentation
¶
Overview ¶
Package config loads the gateway settings: an optional YAML file (flag --config) overridden by environment variables, checked at start.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
DBURL string `yaml:"db_url"`
Listen string `yaml:"listen"`
// The quarantined reader (an OpenAI-compatible API). An empty model switches
// edi.extract_note off: it answers quarantine_invalid and the rest works.
QuarantineBaseURL string `yaml:"quarantine_base_url"`
QuarantineModel string `yaml:"quarantine_model"`
QuarantineAPIKey string `yaml:"quarantine_api_key"`
// The relay that delivers the outbox to the ERP. An empty OnecURL switches it
// off: orders are reserved and stay queued. TimeScale divides the retry pauses.
OnecURL string `yaml:"onec_url"`
RelayWorkers int `yaml:"relay_workers"`
TimeScale float64 `yaml:"time_scale"`
// The warehouse and the trading partner the sagas deliver to. An empty WMSURL leaves the
// warehouse effects queued; an empty PartnerURL leaves the documents for the partner queued.
WMSURL string `yaml:"wms_url"`
PartnerURL string `yaml:"partner_url"`
// Stand settings of the benchmark slots (protocol section 6). PublicURL is the address at which the
// partner emulator reaches this process; the gateway sends it in the header Edigate-Reply-To, so
// that the 997 of a document comes back to the process that sent it. TransportLog is a file that
// gets one JSON line for every MCP request. Both are empty outside the benchmark.
PublicURL string `yaml:"public_url"`
TransportLog string `yaml:"transport_log"`
// The upstream MCP servers the gateway may pass tools of on (flow P8), the public key
// (base64, ed25519) that verifies their pinned descriptions, and the up.* tools each
// tenant may call (data of the policy; empty means none). Without servers there are no
// up.* tools. Servers without a key are switched off at start (see upstream.New).
Upstreams []upstream.Server `yaml:"upstreams"`
ManifestPubKey string `yaml:"manifest_pubkey"`
UpstreamAllow map[string][]string `yaml:"upstream_allow"`
// The key (base64 ed25519, environment only) that signs the anchors of the audit chain, and
// the directory outside the database where the anchors are also written. Without a key the
// chain is written but there are no anchors; without a directory the anchors stay in the database.
AuditSigningKey string `yaml:"-"`
AuditAnchorDir string `yaml:"audit_anchor_dir"`
// Fault injection for tests of the guarantee only (see .env.example). Off by
// default; read from the environment only.
ChaosExitBeforeSend float64 `yaml:"-"`
ChaosExitAfterApply float64 `yaml:"-"`
ChaosCrashAfter time.Duration `yaml:"-"`
ChaosSeed *uint64 `yaml:"-"`
}
Config is everything the gateway needs to start in this version.
Click to show internal directories.
Click to hide internal directories.