config

package
v0.2.20 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: MPL-2.0 Imports: 15 Imported by: 1 module, 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

Index

Constants

View Source
const (
	CtxKeyVersion ctxKey = "v"
	CtxKeyService ctxKey = "service"
	CtxKeyTeam    ctxKey = "team"
	CtxKeyRepo    ctxKey = "repo"
	CtxKeyProject ctxKey = "project"
	CtxKeySubsys  ctxKey = "subsys"
	CtxKeyIsPull  ctxKey = "isPull"
	CtxKeyRef     ctxKey = "ref"
	CtxKeyRid     ctxKey = "rid"
)

Variables

This section is empty.

Functions

func RedactDSN

func RedactDSN(dsn string) string

RedactDSN masks the password in a URL-shaped DSN so it can be logged. A shared-Postgres auth DSN (postgres://user:secret@host/db) carries a credential; file: SQLite DSNs have none and pass through unchanged. On any parse failure it returns a safe constant rather than risk leaking the raw string.

Types

type BuildIdentity added in v0.2.4

type BuildIdentity struct {
	Version        string
	Commit         string
	Chassis        string
	BuildTimestamp string
	InstallMethod  string
}

BuildIdentity is the process build identity, set programmatically by app.Run at boot (NOT from flags/env — no `id` tag, so the flag loader skips it) and surfaced by the admin /healthz JSON. Kept on Config so it reaches server/admin via processor.Unit.Conf without a chassis/cli import cycle (files under chassis/cli import chassis/server).

type Config

type Config struct {
	// Build is set by app.Run after Load (no `id` tag ⇒ ignored by the flag
	// loader); see BuildIdentity.
	Build BuildIdentity

	AdminAddr                    string   `id:"admin-addr" default:":8081" desc:"The port to listen on for the admin web server (:8081)"`
	AdminPass                    string   `id:"admin-pass" default:"" desc:"Basic Auth password ()"`
	AdminUser                    string   `id:"admin-user" default:"" desc:"User for basic auth ()"`
	AdminIdleTimeout             int      `id:"admin-idle-timeout" default:"60" desc:"Idle timeout, seconds (60)"`
	AdminReadTimeout             int      `id:"admin-read-timeout" default:"15" desc:"Read timeout, seconds (15)"`
	AdminStaticRoot              string   `` /* 147-byte string literal not displayed */
	AdminWriteTimeout            int      `id:"admin-write-timeout" default:"15" desc:"Write timeout, seconds (15)"`
	AdminCorsOrigins             []string `` /* 325-byte string literal not displayed */
	AuthMode                     string   `id:"auth-mode" default:"both" desc:"Admin API authentication mode: {basic, signed, both} (both)"`
	AuthDevEnrollSecret          string   `` /* 138-byte string literal not displayed */
	CloudOAuthIssuer             string   `` /* 295-byte string literal not displayed */
	CloudOAuthAudience           string   `` /* 144-byte string literal not displayed */
	CloudChassisURL              string   `` /* 183-byte string literal not displayed */
	ClientVersionLatest          string   `` /* 193-byte string literal not displayed */
	ClientVersionMinimum         string   `` /* 211-byte string literal not displayed */
	ClientVersionCritical        bool     `` /* 197-byte string literal not displayed */
	SecretMasterKeyPath          string   `` /* 332-byte string literal not displayed */
	SecretMasterKeyB64           string   `` /* 413-byte string literal not displayed */
	DemoMode                     bool     `` /* 322-byte string literal not displayed */
	DebugBreakpoints             bool     `` /* 211-byte string literal not displayed */
	DebugPrivate                 bool     `` /* 266-byte string literal not displayed */
	TraceMode                    string   `` /* 129-byte string literal not displayed */
	TraceStore                   string   `` /* 179-byte string literal not displayed */
	TraceDir                     string   `` /* 136-byte string literal not displayed */
	TraceAsync                   bool     `` /* 175-byte string literal not displayed */
	TraceBufferSize              int      `` /* 195-byte string literal not displayed */
	TraceBodyCapBytes            int      `` /* 230-byte string literal not displayed */
	TraceStreamLongPollMS        int      `` /* 344-byte string literal not displayed */
	TraceStreamRingSize          int      `` /* 220-byte string literal not displayed */
	CronPeriod                   int      `id:"cron-period" default:"60" desc:"Seconds between cron ticks, seconds (60)"`
	CronQueue                    string   `` /* 144-byte string literal not displayed */
	CronMaxInflight              int      `` /* 199-byte string literal not displayed */
	CronSystemTick               bool     `` /* 266-byte string literal not displayed */
	ScheduledPeriod              int      `` /* 303-byte string literal not displayed */
	ScheduledMaxInflight         int      `` /* 163-byte string literal not displayed */
	ScheduledStaleAfter          int      `` /* 215-byte string literal not displayed */
	ScheduledRetention           int      `` /* 153-byte string literal not displayed */
	DbRuntimeDsn                 string   `` /* 178-byte string literal not displayed */
	DbAuthDsn                    string   `` /* 268-byte string literal not displayed */
	ScheduledStore               string   `` /* 209-byte string literal not displayed */
	ScheduledDBPath              string   `` /* 218-byte string literal not displayed */
	DbRoot                       string   `id:"db-root-dir" default:"./chassis/data/db" desc:"What is the root directory for any local databases? (./chassis/data/db)"`
	DbSchemaDir                  string   `id:"db-schema-dir" default:"./db/schema/sqlite" desc:"What directory contains the db schema? (./db/schema/sqlite)"`
	DialTimeout                  string   `id:"dial-timeout" default:"100ms" desc:"Default rpc dial timeout (100ms)"`
	DockerBuild                  bool     `id:"docker-build" default:"true" desc:"Attempt to build Dockerfile on push? (true)"`
	DockerRemote                 string   `id:"docker-remote" default:"localhost:5001" desc:"Remote docker host (localhost.5001)"`
	DockerRemoteUser             string   `id:"docker-remote-user" default:"admin" desc:"Remote docker user (admin)"`
	DockerRemotePass             string   `id:"docker-remote-pass" default:"" desc:"Remote docker user ()"`
	DockerTmp                    string   `id:"docker-tmp" default:"./chassis/data/tmp/docker" desc:"Temporary space for building docker (./chassis/data/tmp/docker)"`
	DockerTmpClean               bool     `id:"docker-tmp-clean" default:"true" desc:"Cleanup temporary tar after build? (true)"`
	DockerApiVersion             string   `id:"docker-api-version" default:"1.39" desc:"Default Docker API version (1.39)"`
	Environment                  string   `id:"env" default:"dev" desc:"Runtime Environment: {dev, stage, prod, myenv} (dev)"` //  export TXCOMP_ENV=dev-mm
	EtcdEndpointAddrs            []string `id:"etcd-endpoint-addrs" default:"localhost:2379" desc:"Etcd endpoint addresses Ex: :2379 (:2379)"`
	Fqdn                         string   `id:"fqdn" default:"" desc:"Set our fully qualified domain name"`
	IngressConfigPath            string   `` /* 176-byte string literal not displayed */
	RequireHostnameVerification  bool     `` /* 313-byte string literal not displayed */
	StructuredHostSuffix         string   `` /* 357-byte string literal not displayed */
	StructuredDNSSelf            bool     `` /* 436-byte string literal not displayed */
	VerifyAllowPrivateAddresses  bool     `` /* 275-byte string literal not displayed */
	IngressMissAction            string   `` /* 368-byte string literal not displayed */
	K8sNamespace                 string   `id:"k8s-namespace" default:"default" desc:"Kubernetes Namespace (default)"`
	KubeConfig                   string   `id:"kube-config" default:"$USER/.kube/config" desc:"What path to use for Kubernetes Config? ($USER/.kube/config)"`
	KubeCheckInCluster           bool     `` /* 154-byte string literal not displayed */
	KVStore                      string   `` /* 206-byte string literal not displayed */
	KVStoreAddrs                 []string `id:"kvstore-addrs" default:"./chassis/data/kv" desc:"List of KVStore addresses, if appropriate. (./chassis/data/kv)"`
	KVStoreBucket                string   `id:"kvstore-bucket" default:"txco" desc:"KVStore bucket (boltdb only) (txco)"`
	KVStorePassword              string   `` /* 258-byte string literal not displayed */
	KVMaxValueBytes              int      `` /* 197-byte string literal not displayed */
	KVMaxTTL                     int      `` /* 219-byte string literal not displayed */
	Logger                       string   `id:"logger" default:"env" desc:"Set Log display type: {env, production, dev, dev-plain} (env)"`
	LogLevel                     string   `id:"log-level" default:"" desc:"Set Logging Level: {debug, info, warn, error, dpanic, panic, and fatal} (info)"`
	LogOps                       string   `id:"log-ops" default:"disabled" desc:"Log operations to {logger,disabled,dir} (disabled)"`
	LogOpsDir                    string   `id:"log-ops-dir" default:"./chassis/data/logs" desc:"Directory to log operations to (./chassis/data/logs)"`
	OpPayloadMax                 int      `id:"op-payload-max" default:"4194304" desc:"maximum message that operations can send/receive in bytes (4194304)"`
	OpMetricsRegex               string   `` /* 149-byte string literal not displayed */
	OpTimeout                    string   `id:"op-timeout" default:"5s" desc:"Default operation timeout (5s)"`
	OpTimeoutMax                 string   `` /* 172-byte string literal not displayed */
	MaxFuelPerRequest            int      `` /* 392-byte string literal not displayed */
	OpScopeTTLMax                int      `` /* 317-byte string literal not displayed */
	OpRepeatPenaltyMs            int      `` /* 210-byte string literal not displayed */
	AIChatEnvFallback            bool     `` /* 428-byte string literal not displayed */
	AIDefaultTimeout             string   `` /* 251-byte string literal not displayed */
	EmbedOllamaBaseURL           string   `` /* 333-byte string literal not displayed */
	VectorDBPath                 string   `` /* 324-byte string literal not displayed */
	VectorStore                  string   `` /* 165-byte string literal not displayed */
	DevAutoVerifyLocalHostnames  bool     `` /* 420-byte string literal not displayed */
	AsyncRuntimeDefault          string   `` /* 203-byte string literal not displayed */
	AsyncAckTimeout              string   `` /* 130-byte string literal not displayed */
	ContinueAfterDefault         string   `` /* 229-byte string literal not displayed */
	ContinuableTimeoutDefault    string   `` /* 228-byte string literal not displayed */
	DeferredJoinSlack            string   `` /* 185-byte string literal not displayed */
	ComputeMaxMemoryMB           int      `id:"compute-max-memory-mb" default:"32" desc:"Per-invocation memory cap for a sandboxed compute (op://) in MB. (32)"`
	ComputeMaxWall               string   `` /* 155-byte string literal not displayed */
	Personalities                string   `` /* 157-byte string literal not displayed */
	Repl                         bool     `id:"repl" default:"false" desc:"Run REPL mode"`
	PromNamespace                string   `id:"prom-namespace" default:"txco" desc:"Set the Prometheus namespace (txco)"`
	PromPeriod                   int      `id:"prom-period" default:"5" desc:"Set the Prometheus reporting period (5)"`
	PushActionTimeout            int      `id:"push-action-timeout" default:"300" desc:"Timeout for push actions, in seconds (300)"`
	RegistryFixed                []string `id:"registry-fixed" default:"" desc:"Set to use a fixed operation name registry. Prefix:Address:Port ex: *:localhost:5858 ()"`
	RepoCloneSource              string   `` /* 143-byte string literal not displayed */
	RepoStore                    string   `id:"repostore" default:"file" desc:"Which Repo Store to use? {memory, file} (file)"`
	RepoStoreFileDir             string   `` /* 134-byte string literal not displayed */
	ContinuationStore            string   `` /* 126-byte string literal not displayed */
	ContinuationStoreFileDir     string   `` /* 156-byte string literal not displayed */
	ContinuationStoreS3Bucket    string   `` /* 140-byte string literal not displayed */
	ContinuationStoreS3Prefix    string   `` /* 144-byte string literal not displayed */
	ContinuationCallbackBaseURL  string   `` /* 143-byte string literal not displayed */
	ContinuationSweepPeriod      int      `id:"continuation-sweep-period" default:"900" desc:"Seconds between continuation store sweeps; 0 disables the sweeper (900)"`
	ContinuationRetention        int      `id:"continuation-retention" default:"604800" desc:"Seconds after a run's expiry before its docs are purged (604800 = 7d)"`
	ContinuationStaleResumeAfter int      `` /* 136-byte string literal not displayed */
	ArtifactStore                string   `id:"artifact-store" default:"file" desc:"Snapshot/event artifact store backend: {file} (file)"`
	ArtifactStoreFileDir         string   `` /* 140-byte string literal not displayed */
	FileCASStore                 string   `` /* 132-byte string literal not displayed */
	FileCASStoreFileDir          string   `` /* 144-byte string literal not displayed */
	FileCASStoreS3Bucket         string   `id:"filecas-store-s3-bucket" default:"" desc:"Reserved: S3-compatible filecas bucket (fleet overlay; unused in open core)"`
	FileCASStoreS3Prefix         string   `` /* 126-byte string literal not displayed */
	FileCASCacheBytes            int      `` /* 131-byte string literal not displayed */
	FileCASMaxFileBytes          int      `` /* 183-byte string literal not displayed */
	DatasetCacheDir              string   `` /* 248-byte string literal not displayed */
	DatasetCacheBytes            int      `` /* 194-byte string literal not displayed */
	DatasetMaxFileBytes          int      `` /* 173-byte string literal not displayed */
	DatasetMaxRows               int      `` /* 167-byte string literal not displayed */
	SnapshotBootstrapRef         string   `` /* 178-byte string literal not displayed */
	FeedSource                   string   `` /* 136-byte string literal not displayed */
	FeedSourceFileDir            string   `id:"feed-source-file-dir" default:"./chassis/data/feed" desc:"Root directory for the file feed source (./chassis/data/feed)"`
	FeedPollPeriod               int      `id:"feed-poll-period" default:"15" desc:"Seconds between control-event feed polls; applies when feed-source != nop (15)"`
	FeedSink                     string   `` /* 151-byte string literal not displayed */
	FeedSinkBatchSize            int      `id:"feed-sink-batch-size" default:"64" desc:"Max outbox rows drained per pump tick when feed-sink != nop (64)"`
	RoomRelay                    string   `id:"room-relay" default:"" desc:"Cross-node room-message relay: empty (default) = in-process only (single node). ()"`
	EgressPolicy                 string   `` /* 208-byte string literal not displayed */
	EgressDenyCIDRs              []string `` /* 155-byte string literal not displayed */
	EgressAllowCIDRs             []string `` /* 188-byte string literal not displayed */
	SystemOpstacksDir            string   `` /* 255-byte string literal not displayed */
	SystemOpstacksWatch          bool     `` /* 176-byte string literal not displayed */
	ReadFileMaxBytes             int      `` /* 288-byte string literal not displayed */
	ServerId                     string   `id:"sid" default:"" desc:"Set the Server Id ()"`
	LMTPListenAddrs              []string `` /* 321-byte string literal not displayed */
	LMTPMaxMsgBytes              int      `` /* 149-byte string literal not displayed */
	LMTPMaxRecipients            int      `id:"lmtp-max-recipients" default:"50" desc:"Max RCPT TO addresses per LMTP transaction. (50)"`
	LMTPReadTimeout              string   `id:"lmtp-read-timeout" default:"30s" desc:"Per-command read timeout for the LMTP listener. (30s)"`
	LMTPDataTimeout              string   `id:"lmtp-data-timeout" default:"60s" desc:"DATA phase read timeout for the LMTP listener. (60s)"`
	LMTPRespTimeout              string   `` /* 134-byte string literal not displayed */
	LMTPHostname                 string   `id:"lmtp-hostname" default:"" desc:"Greeting hostname for the LMTP server. Empty (default) uses os.Hostname(). ()"`
	LMTPDefaultHosts             []string `` /* 264-byte string literal not displayed */
	MailMapListenAddrs           []string `` /* 500-byte string literal not displayed */
	MailMapReadTimeout           string   `id:"mailmap-read-timeout" default:"5s" desc:"Per-request read timeout for the mailmap tcp_table responder. (5s)"`
	MailRelayAddr                string   `` /* 265-byte string literal not displayed */
	MailRelayTLS                 string   `` /* 219-byte string literal not displayed */
	MailDialTimeoutMS            int      `` /* 174-byte string literal not displayed */
	MailMaxRecipients            int      `` /* 232-byte string literal not displayed */
	MailRateLimits               string   `` /* 388-byte string literal not displayed */
	MailSpamThresholds           string   `` /* 465-byte string literal not displayed */
	TCPListenAddrs               []string `` /* 390-byte string literal not displayed */
	TCPConnectRespTimeout        string   `id:"tcp-connect-resp-timeout" default:"3s" desc:"Time that backends must accept a new connection before dropping it. (3s)"`
	TCPMaxIdleTimeout            string   `id:"tcp-max-idle-timeout" default:"5s" desc:"Max idle time between commands. May be set lower at runtime. (5s)"`
	TCPRespTimeout               string   `id:"tcp-resp-timeout" default:"10s" desc:"Max time for us to respond to command. (10s)"`
	DNSListenAddrs               []string `` /* 370-byte string literal not displayed */
	DNSRRLPerSec                 int      `` /* 171-byte string literal not displayed */
	DNSNameservers               []string `` /* 259-byte string literal not displayed */
	DNSEdgeIPs                   []string `` /* 211-byte string literal not displayed */
	DNSMXHost                    string   `` /* 183-byte string literal not displayed */
	DNSMXPriority                int      `id:"dns-mx-priority" default:"10" desc:"Preference value for synthesized MX records. (10)"`
	DNSSynthTTL                  int      `id:"dns-synth-ttl" default:"60" desc:"TTL (seconds) applied to synthesized pattern records. (60)"`
	DNSSPF                       string   `` /* 244-byte string literal not displayed */
	DNSDMARC                     string   `` /* 281-byte string literal not displayed */
	DNSTenantZoneManagement      bool     `` /* 426-byte string literal not displayed */
	DNSRequireZoneVerification   bool     `` /* 485-byte string literal not displayed */
	DNSUpdateTSIGKeyName         string   `` /* 385-byte string literal not displayed */
	DNSUpdateTSIGSecret          string   `` /* 243-byte string literal not displayed */
	WebTLSAddr                   string   `` /* 422-byte string literal not displayed */
	ACMEEmail                    string   `` /* 190-byte string literal not displayed */
	ACMECA                       string   `` /* 233-byte string literal not displayed */
	ACMECARootFile               string   `` /* 230-byte string literal not displayed */
	ACMEDNSResolvers             []string `` /* 318-byte string literal not displayed */
	CertStorageDSN               string   `` /* 317-byte string literal not displayed */
	CertStoragePath              string   `` /* 141-byte string literal not displayed */
	WebAddr                      string   `id:"web-addr" default:":8080" desc:"The port to listen on for the web server (:8080)"`
	WebPass                      string   `id:"web-pass" default:"" desc:"Basic Auth password ()"`
	WebUser                      string   `id:"web-user" default:"" desc:"User for basic auth ()"`
	WebIdleTimeout               int      `id:"web-idle-timeout" default:"60" desc:"Idle timeout, seconds (60)"`
	WebReadTimeout               int      `id:"web-read-timeout" default:"15" desc:"Read timeout, seconds (15)"`
	WebWriteTimeout              int      `id:"web-write-timeout" default:"15" desc:"Write timeout, seconds (15)"`
	ContinuationLongPollMS       int      `` /* 229-byte string literal not displayed */
	WebDebug                     string   `id:"web-debug" default:"" desc:"Debug flags: SHOW_PRIVATE_VARS, HIDE_PRIVATE_VARS"`
	WebMockHeader                bool     `` /* 185-byte string literal not displayed */
	UsageEnabled                 bool     `` /* 216-byte string literal not displayed */
	UsageSink                    string   `` /* 192-byte string literal not displayed */
	TelemetryEnabled             bool     `` /* 238-byte string literal not displayed */
	TelemetryExporter            string   `` /* 201-byte string literal not displayed */
	BackgroundServices           string   `` /* 178-byte string literal not displayed */
}

Command Line Flags / Environment variables to configure runtime environment

func Load

func Load() (Config, error)

Jump to

Keyboard shortcuts

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